Add a warning when not on a master branch

This commit is contained in:
Tagadda
2022-02-22 23:44:44 +00:00
parent 6b97ef7a19
commit 426ea91d4c
3 changed files with 6 additions and 2 deletions

View File

@ -53,6 +53,9 @@ def generate_READMEs(app_path: str):
else:
disclaimer = None
# Get the current branch using git inside the app path
branch = os.popen("git --git-dir=%s/.git --work-tree=%s rev-parse --abbrev-ref HEAD" % (app_path, app_path)).read().strip()
out = template.render(
lang=lang,
upstream=upstream,
@ -60,6 +63,7 @@ def generate_READMEs(app_path: str):
screenshots=screenshots,
disclaimer=disclaimer,
manifest=manifest,
branch=branch,
)
(app_path / f"README{lang_suffix}.md").write_text(out)