Skip to content

Commit

Permalink
changes to changelog generation (no pun intended)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberw committed Feb 13, 2022
1 parent 0e4d330 commit 2c08cec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ build_docs:
sphinx-build -b html docs/ docs/_build/

changelog:
python3 generate_changelog.py
@echo "Not supported any more. Run ./generate_changelog.py <version_number> instead!"

sass_watch:
sass --watch locust/static/sass:locust/static/css
Expand Down
13 changes: 12 additions & 1 deletion generate_changelog.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
#!/usr/bin/env python3

import subprocess
import os
import sys

github_api_token = (
os.getenv("CHANGELOG_GITHUB_TOKEN") if os.getenv("CHANGELOG_GITHUB_TOKEN") else input("Enter Github API token: ")
)
version = input("Enter Locust version number (--future-release argument): ")

if len(sys.argv) < 2:
raise Exception("Provide a version number as parameter (--future-release argument)")

version = sys.argv[1]

cmd = [
"github_changelog_generator",
Expand All @@ -16,6 +23,10 @@
"locust",
"--exclude-labels",
"duplicate,question,invalid,wontfix,cantfix,stale",
"--header-label",
"# Changelog\nNote that PRs for the latest version are sometimes missing here, check [github](https://github.com/locustio/locust/releases) for the latest info.",
"--since-tag",
"0.9.0",
"--future-release",
version,
]
Expand Down

0 comments on commit 2c08cec

Please sign in to comment.