Skip to content

Commit f6297af

Browse files
authored
fix: render nightly release note line breaks (#130)
Signed-off-by: Vitor Mattos <vitor@php.rio>
1 parent 8ec03dc commit f6297af

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

‎tests/test_nightly_release_template.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ def test_nightly_runs_full_package_and_publication_path(self) -> None:
3535
self.assertIn("gh release create nightly", content)
3636
self.assertIn("nextcloud-libraries/nextcloud-appstore-push-action@", content)
3737
self.assertIn("nightly: true", content)
38-
self.assertIn("printf 'Automated nightly build from `%s`.\\\\n'", content)
39-
self.assertIn("printf 'Generated from commit `%s`.\\\\n'", content)
38+
self.assertIn("printf 'Automated nightly build from `%s`.\\n'", content)
39+
self.assertIn("printf 'Generated from commit `%s`.\\n'", content)
4040
self.assertNotIn("from `%s`.\\\\\\\\n", content)
4141

4242
def test_server_is_available_before_makefile_packaging(self) -> None:
@@ -49,6 +49,11 @@ def test_server_is_available_before_makefile_packaging(self) -> None:
4949
self.assertLess(server, package)
5050
self.assertLess(package, sign)
5151

52+
def test_release_notes_do_not_emit_literal_newline_escapes(self) -> None:
53+
content = TEMPLATE.read_text(encoding="utf-8")
54+
55+
self.assertNotIn(".\\\\\\\\n'", content)
56+
5257
def test_checkout_credentials_are_not_persisted(self) -> None:
5358
content = TEMPLATE.read_text(encoding="utf-8")
5459

‎workflow-templates/nightly-release.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ jobs:
251251
{
252252
echo "## 🌙 Nightly Build - ${APP_VERSION}"
253253
echo
254-
printf 'Automated nightly build from `%s`.\\n' "${NIGHTLY_BRANCH}"
254+
printf 'Automated nightly build from `%s`.\n' "${NIGHTLY_BRANCH}"
255255
echo
256256
echo "⚠️ **Development version** - may contain bugs or unstable features."
257257
echo
@@ -260,7 +260,7 @@ jobs:
260260
printf '%s\n' "${commits}"
261261
echo
262262
echo "---"
263-
printf 'Generated from commit `%s`.\\n' "${GITHUB_SHA:0:7}"
263+
printf 'Generated from commit `%s`.\n' "${GITHUB_SHA:0:7}"
264264
} > release-notes.md
265265
266266
- name: Create or update GitHub release

0 commit comments

Comments
 (0)