Skip to content

Commit d51b375

Browse files
committed
Drop unneeded version tag argument
1 parent 3a7caaf commit d51b375

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

.github/workflows/post-release-mergeback.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,8 @@ jobs:
123123
- name: Prepare partial Changelog
124124
env:
125125
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
126-
VERSION: "${{ steps.getVersion.outputs.version }}"
127126
run: |
128-
python .github/workflows/script/prepare_changelog.py CHANGELOG.md "$VERSION" > $PARTIAL_CHANGELOG
127+
python .github/workflows/script/prepare_changelog.py CHANGELOG.md > $PARTIAL_CHANGELOG
129128
130129
echo "::group::Partial CHANGELOG"
131130
cat $PARTIAL_CHANGELOG

.github/workflows/rollback-release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,8 @@ jobs:
127127
env:
128128
NEW_CHANGELOG: "${{ runner.temp }}/new_changelog.md"
129129
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
130-
VERSION: "${{ needs.prepare.outputs.version }}"
131130
run: |
132-
python .github/workflows/script/prepare_changelog.py $NEW_CHANGELOG "$VERSION" > $PARTIAL_CHANGELOG
131+
python .github/workflows/script/prepare_changelog.py $NEW_CHANGELOG > $PARTIAL_CHANGELOG
133132
134133
echo "::group::Partial CHANGELOG"
135134
cat $PARTIAL_CHANGELOG

.github/workflows/script/prepare_changelog.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Prepare the changelog for the new release
88
# This function will extract the part of the changelog that
99
# we want to include in the new release.
10-
def extract_changelog_snippet(changelog_file, version_tag):
10+
def extract_changelog_snippet(changelog_file):
1111
output = ''
1212
if (not os.path.exists(changelog_file)):
1313
output = EMPTY_CHANGELOG
@@ -29,9 +29,7 @@ def extract_changelog_snippet(changelog_file, version_tag):
2929
return output.strip()
3030

3131

32-
if len(sys.argv) < 3:
33-
raise Exception('Expecting argument: changelog_file version_tag')
32+
if len(sys.argv) < 2:
33+
raise Exception('Expecting argument: changelog_file')
3434
changelog_file = sys.argv[1]
35-
version_tag = sys.argv[2]
36-
37-
print(extract_changelog_snippet(changelog_file, version_tag))
35+
print(extract_changelog_snippet(changelog_file))

0 commit comments

Comments
 (0)