mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Drop unneeded version tag argument
This commit is contained in:
3
.github/workflows/post-release-mergeback.yml
vendored
3
.github/workflows/post-release-mergeback.yml
vendored
@@ -123,9 +123,8 @@ jobs:
|
|||||||
- name: Prepare partial Changelog
|
- name: Prepare partial Changelog
|
||||||
env:
|
env:
|
||||||
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
|
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
|
||||||
VERSION: "${{ steps.getVersion.outputs.version }}"
|
|
||||||
run: |
|
run: |
|
||||||
python .github/workflows/script/prepare_changelog.py CHANGELOG.md "$VERSION" > $PARTIAL_CHANGELOG
|
python .github/workflows/script/prepare_changelog.py CHANGELOG.md > $PARTIAL_CHANGELOG
|
||||||
|
|
||||||
echo "::group::Partial CHANGELOG"
|
echo "::group::Partial CHANGELOG"
|
||||||
cat $PARTIAL_CHANGELOG
|
cat $PARTIAL_CHANGELOG
|
||||||
|
|||||||
3
.github/workflows/rollback-release.yml
vendored
3
.github/workflows/rollback-release.yml
vendored
@@ -127,9 +127,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NEW_CHANGELOG: "${{ runner.temp }}/new_changelog.md"
|
NEW_CHANGELOG: "${{ runner.temp }}/new_changelog.md"
|
||||||
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
|
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
|
||||||
VERSION: "${{ needs.prepare.outputs.version }}"
|
|
||||||
run: |
|
run: |
|
||||||
python .github/workflows/script/prepare_changelog.py $NEW_CHANGELOG "$VERSION" > $PARTIAL_CHANGELOG
|
python .github/workflows/script/prepare_changelog.py $NEW_CHANGELOG > $PARTIAL_CHANGELOG
|
||||||
|
|
||||||
echo "::group::Partial CHANGELOG"
|
echo "::group::Partial CHANGELOG"
|
||||||
cat $PARTIAL_CHANGELOG
|
cat $PARTIAL_CHANGELOG
|
||||||
|
|||||||
10
.github/workflows/script/prepare_changelog.py
vendored
10
.github/workflows/script/prepare_changelog.py
vendored
@@ -7,7 +7,7 @@ EMPTY_CHANGELOG = 'No changes.\n\n'
|
|||||||
# Prepare the changelog for the new release
|
# Prepare the changelog for the new release
|
||||||
# This function will extract the part of the changelog that
|
# This function will extract the part of the changelog that
|
||||||
# we want to include in the new release.
|
# we want to include in the new release.
|
||||||
def extract_changelog_snippet(changelog_file, version_tag):
|
def extract_changelog_snippet(changelog_file):
|
||||||
output = ''
|
output = ''
|
||||||
if (not os.path.exists(changelog_file)):
|
if (not os.path.exists(changelog_file)):
|
||||||
output = EMPTY_CHANGELOG
|
output = EMPTY_CHANGELOG
|
||||||
@@ -29,9 +29,7 @@ def extract_changelog_snippet(changelog_file, version_tag):
|
|||||||
return output.strip()
|
return output.strip()
|
||||||
|
|
||||||
|
|
||||||
if len(sys.argv) < 3:
|
if len(sys.argv) < 2:
|
||||||
raise Exception('Expecting argument: changelog_file version_tag')
|
raise Exception('Expecting argument: changelog_file')
|
||||||
changelog_file = sys.argv[1]
|
changelog_file = sys.argv[1]
|
||||||
version_tag = sys.argv[2]
|
print(extract_changelog_snippet(changelog_file))
|
||||||
|
|
||||||
print(extract_changelog_snippet(changelog_file, version_tag))
|
|
||||||
|
|||||||
Reference in New Issue
Block a user