File tree Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 10
10
from scripts .release .release_notes import calculate_next_version_with_changelog
11
11
12
12
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
+ )
14
17
parser .add_argument (
15
18
"-p" ,
16
19
"--path" ,
46
49
type = str ,
47
50
help = f"Version to use if no previous version tag is found. Default is '{ DEFAULT_INITIAL_GIT_TAG_VERSION } '" ,
48
51
)
49
- parser .add_argument ("--output" , "-o" , type = pathlib .Path )
50
52
args = parser .parse_args ()
51
53
52
54
repo = Repo (args .path )
Original file line number Diff line number Diff line change 15
15
)
16
16
17
17
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
+ )
19
22
parser .add_argument (
20
23
"-c" ,
21
24
"--changelog-path" ,
Original file line number Diff line number Diff line change @@ -72,7 +72,10 @@ def calculate_next_version_with_changelog(
72
72
73
73
74
74
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
+ )
76
79
parser .add_argument (
77
80
"-p" ,
78
81
"--path" ,
@@ -108,7 +111,13 @@ def calculate_next_version_with_changelog(
108
111
type = str ,
109
112
help = f"Version to use if no previous version tag is found. Default is '{ DEFAULT_INITIAL_GIT_TAG_VERSION } '" ,
110
113
)
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
+ )
112
121
args = parser .parse_args ()
113
122
114
123
release_notes = generate_release_notes (
You can’t perform that action at this time.
0 commit comments