mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-27 23:47:39 +01:00
ci: fix indentation in release notes
This commit is contained in:
@@ -140,15 +140,7 @@ def main():
|
|||||||
formatted = now.strftime("%Y-%m-%dT%H:%M:%SZ")
|
formatted = now.strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||||
human = now.strftime("%c")
|
human = now.strftime("%c")
|
||||||
|
|
||||||
localized_description = textwrap.dedent(f"""
|
localized_description = getFormattedLocalizedDescription(args.marketing_version, args.short_commit, human, notes)
|
||||||
This is release for:
|
|
||||||
- version: "{args.marketing_version}"
|
|
||||||
- revision: "{args.short_commit}"
|
|
||||||
- timestamp: "{human}"
|
|
||||||
|
|
||||||
Release Notes:
|
|
||||||
{notes}
|
|
||||||
""").strip()
|
|
||||||
|
|
||||||
metadata = {
|
metadata = {
|
||||||
"is_beta": bool(args.is_beta),
|
"is_beta": bool(args.is_beta),
|
||||||
@@ -170,6 +162,16 @@ def main():
|
|||||||
|
|
||||||
print(f"Wrote {out_file}")
|
print(f"Wrote {out_file}")
|
||||||
|
|
||||||
|
def getFormattedLocalizedDescription(marketing_version, short_commit, human, notes):
|
||||||
|
return f"""
|
||||||
|
This is release for:
|
||||||
|
- version: "{marketing_version}"
|
||||||
|
- revision: "{short_commit}"
|
||||||
|
- timestamp: "{human}"
|
||||||
|
|
||||||
|
Release Notes:
|
||||||
|
{notes}
|
||||||
|
""".lstrip("\n")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
@@ -408,20 +408,7 @@ def upload_release(release_name, release_tag, commit_sha, repo, upstream_recomme
|
|||||||
if upstream_recommendation and upstream_recommendation.strip():
|
if upstream_recommendation and upstream_recommendation.strip():
|
||||||
upstream_block = f"{upstream_recommendation.strip()}\n\n"
|
upstream_block = f"{upstream_recommendation.strip()}\n\n"
|
||||||
|
|
||||||
raw_body = f"""
|
header = getFormattedUploadMsg(release_name, release_tag, commit_sha, repo, upstream_block, built_time, built_date, marketing_version)
|
||||||
This is an ⚠️ **EXPERIMENTAL** ⚠️ {release_name} build for commit [{commit_sha}](https://github.com/{repo}/commit/{commit_sha}).
|
|
||||||
|
|
||||||
{release_name} builds are **extremely experimental builds only meant to be used by developers and beta testers. They often contain bugs and experimental features. Use at your own risk!**
|
|
||||||
|
|
||||||
{upstream_block}## Build Info
|
|
||||||
|
|
||||||
Built at (UTC): `{built_time}`
|
|
||||||
Built at (UTC date): `{built_date}`
|
|
||||||
Commit SHA: `{commit_sha}`
|
|
||||||
Version: `{marketing_version}`
|
|
||||||
"""
|
|
||||||
|
|
||||||
header = inspect.cleandoc(raw_body)
|
|
||||||
body = header + "\n\n" + release_notes.lstrip() + "\n"
|
body = header + "\n\n" + release_notes.lstrip() + "\n"
|
||||||
|
|
||||||
body_file = ROOT / "release_body.md"
|
body_file = ROOT / "release_body.md"
|
||||||
@@ -442,6 +429,20 @@ def upload_release(release_name, release_tag, commit_sha, repo, upstream_recomme
|
|||||||
f'--clobber'
|
f'--clobber'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def getFormattedUploadMsg(release_name, release_tag, commit_sha, repo, upstream_block, built_time, built_date, marketing_version):
|
||||||
|
return f"""
|
||||||
|
This is an ⚠️ **EXPERIMENTAL** ⚠️ {release_name} build for commit [{commit_sha}](https://github.com/{repo}/commit/{commit_sha}).
|
||||||
|
|
||||||
|
{release_name} builds are **extremely experimental builds only meant to be used by developers and beta testers. They often contain bugs and experimental features. Use at your own risk!**
|
||||||
|
|
||||||
|
{upstream_block}## Build Info
|
||||||
|
|
||||||
|
Built at (UTC): `{built_time}`
|
||||||
|
Built at (UTC date): `{built_date}`
|
||||||
|
Commit SHA: `{commit_sha}`
|
||||||
|
Version: `{marketing_version}`
|
||||||
|
""".lstrip("\n")
|
||||||
|
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# ENTRYPOINT
|
# ENTRYPOINT
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user