diff --git a/tests/test_nightly_release_template.py b/tests/test_nightly_release_template.py index 315b5a8..021397f 100644 --- a/tests/test_nightly_release_template.py +++ b/tests/test_nightly_release_template.py @@ -35,8 +35,8 @@ def test_nightly_runs_full_package_and_publication_path(self) -> None: self.assertIn("gh release create nightly", content) self.assertIn("nextcloud-libraries/nextcloud-appstore-push-action@", content) self.assertIn("nightly: true", content) - self.assertIn("printf 'Automated nightly build from `%s`.\\\\n'", content) - self.assertIn("printf 'Generated from commit `%s`.\\\\n'", content) + self.assertIn("printf 'Automated nightly build from `%s`.\\n'", content) + self.assertIn("printf 'Generated from commit `%s`.\\n'", content) self.assertNotIn("from `%s`.\\\\\\\\n", content) def test_server_is_available_before_makefile_packaging(self) -> None: @@ -49,6 +49,11 @@ def test_server_is_available_before_makefile_packaging(self) -> None: self.assertLess(server, package) self.assertLess(package, sign) + def test_release_notes_do_not_emit_literal_newline_escapes(self) -> None: + content = TEMPLATE.read_text(encoding="utf-8") + + self.assertNotIn(".\\\\\\\\n'", content) + def test_checkout_credentials_are_not_persisted(self) -> None: content = TEMPLATE.read_text(encoding="utf-8") diff --git a/workflow-templates/nightly-release.yml b/workflow-templates/nightly-release.yml index 3dad2a2..81f905e 100644 --- a/workflow-templates/nightly-release.yml +++ b/workflow-templates/nightly-release.yml @@ -251,7 +251,7 @@ jobs: { echo "## 🌙 Nightly Build - ${APP_VERSION}" echo - printf 'Automated nightly build from `%s`.\\n' "${NIGHTLY_BRANCH}" + printf 'Automated nightly build from `%s`.\n' "${NIGHTLY_BRANCH}" echo echo "⚠️ **Development version** - may contain bugs or unstable features." echo @@ -260,7 +260,7 @@ jobs: printf '%s\n' "${commits}" echo echo "---" - printf 'Generated from commit `%s`.\\n' "${GITHUB_SHA:0:7}" + printf 'Generated from commit `%s`.\n' "${GITHUB_SHA:0:7}" } > release-notes.md - name: Create or update GitHub release