Skip to content

Commit db923c4

Browse files
committed
Add documentation for release script
1 parent a4dfe6e commit db923c4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

release.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@
55

66

77
def main():
8+
"""
9+
Parses the command-line arguments release.py has been called with and
10+
runs the respective command.
11+
12+
Valid commands:
13+
- release.py check-changelog --tag <GIT TAG>
14+
Checks whether the Git tag provided in the --tag option exists
15+
in the changelog. If it doesn't, release.py will error.
16+
- release.py print-changelog --tag <GIT TAG>
17+
Prints the changelog for the Git tag provided in the --tag option
18+
to Stdout. The output will be empty if the tag isn't in the
19+
changelog.
20+
21+
release.py expects the Git tag to start with `v`, e.g. `v0.1.2`. In the
22+
changelog however, only the release numbers are expected, e.g. `0.1.2`.
23+
Headings for releases need to be in the syntax `## [0.1.2]`.
24+
"""
825
parser = argparse.ArgumentParser()
926
parser.add_argument("run", type=str, help="the task to run")
1027
parser.add_argument("--tag", type=str, help="the Git tag to work with")

0 commit comments

Comments
 (0)