Skip to content

Commit 23e1224

Browse files
committed
Review fixes v3
1 parent 5713666 commit 23e1224

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

scripts/release/calculate_next_version.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
from scripts.release.release_notes import calculate_next_version_with_changelog
1111

1212
if __name__ == "__main__":
13-
parser = argparse.ArgumentParser()
13+
parser = argparse.ArgumentParser(
14+
description="Calculate the next version based on the changes since the previous version tag.",
15+
formatter_class=argparse.RawTextHelpFormatter,
16+
)
1417
parser.add_argument(
1518
"-p",
1619
"--path",
@@ -46,7 +49,6 @@
4649
type=str,
4750
help=f"Version to use if no previous version tag is found. Default is '{DEFAULT_INITIAL_GIT_TAG_VERSION}'",
4851
)
49-
parser.add_argument("--output", "-o", type=pathlib.Path)
5052
args = parser.parse_args()
5153

5254
repo = Repo(args.path)

scripts/release/create_changelog.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
)
1616

1717
if __name__ == "__main__":
18-
parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter)
18+
parser = argparse.ArgumentParser(
19+
description="Utility to easily create a new changelog entry file.",
20+
formatter_class=argparse.RawTextHelpFormatter,
21+
)
1922
parser.add_argument(
2023
"-c",
2124
"--changelog-path",

scripts/release/release_notes.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ def calculate_next_version_with_changelog(
7272

7373

7474
if __name__ == "__main__":
75-
parser = argparse.ArgumentParser()
75+
parser = argparse.ArgumentParser(
76+
description="Generate release notes based on the changes since the previous version tag.",
77+
formatter_class=argparse.RawTextHelpFormatter,
78+
)
7679
parser.add_argument(
7780
"-p",
7881
"--path",
@@ -108,7 +111,13 @@ def calculate_next_version_with_changelog(
108111
type=str,
109112
help=f"Version to use if no previous version tag is found. Default is '{DEFAULT_INITIAL_GIT_TAG_VERSION}'",
110113
)
111-
parser.add_argument("--output", "-o", type=pathlib.Path)
114+
parser.add_argument(
115+
"--output",
116+
"-o",
117+
metavar="",
118+
type=pathlib.Path,
119+
help="Path to save the release notes. If not provided, prints to stdout.",
120+
)
112121
args = parser.parse_args()
113122

114123
release_notes = generate_release_notes(

0 commit comments

Comments
 (0)