-
Notifications
You must be signed in to change notification settings - Fork 14
ci(ipa): use release tags for IPA ruleset #889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
cbdd1f6
ci(ipa): use release tags for IPA ruleset
lovisaberggren a57e9df
ci(ipa): create release tag in IPA ruleset release
lovisaberggren 7af385f
fix: release workflow
lovisaberggren 2e911fa
fix: release workflow
lovisaberggren 9ed8ca6
fix: changelog
lovisaberggren e6af4e5
fix: changelog test
lovisaberggren 374efcf
fix: changelog test
lovisaberggren 1cde20e
test: should be successful
lovisaberggren 9a29a6f
test: should fail
lovisaberggren 5080895
test: should fail
lovisaberggren ae289ce
test: should fail
lovisaberggren b8cbd5e
test: should fail
lovisaberggren 7c394fd
test: should fail
lovisaberggren df0225c
test: should be successful
lovisaberggren c168c00
test: should fail
lovisaberggren bf92a5e
test: should be successful
lovisaberggren 9bf776f
fix: restore changelog
lovisaberggren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,20 +32,23 @@ jobs: | |
env: | ||
VERSION_BUMP: ${{ steps.version_check.outputs.version_changed }} | ||
run: | | ||
npm run gen-ipa-changelog | ||
|
||
# Check for uncommitted changes specific to CHANGELOG.md | ||
uncommitted_changes=$(git status --porcelain | grep "CHANGELOG.md" || echo "") | ||
|
||
diff_changelog=$(git diff -- tools/spectral/ipa/CHANGELOG.md || echo "") | ||
diff_changelog=$(git diff origin/main -- CHANGELOG.md || echo "") | ||
|
||
echo "Changelog diff: ${diff_changelog}" | ||
|
||
if [[ "${VERSION_BUMP}" == "false" && -n "${uncommitted_changes}" ]]; then | ||
if [[ "${VERSION_BUMP}" == "false" && -n "${diff_changelog}" ]]; then | ||
echo "Error: Changelog should only be updated alongside a version bump. Please restore the changelog." | ||
exit 1 | ||
fi | ||
|
||
if [[ "${VERSION_BUMP}" == "true" && -n "${diff_changelog}" ]]; then | ||
echo "Error: Changelog must be updated alongside a version bump. Please run 'npm run gen-ipa-changelog' from the ipa directory and commit the changes." | ||
|
||
npm run gen-ipa-changelog | ||
|
||
# Check CHANGELOG.md is the generated changelog result | ||
uncommitted_changes=$(git status --porcelain | grep "CHANGELOG.md" || echo "") | ||
|
||
if [[ "${VERSION_BUMP}" == "true" && -n "${uncommitted_changes}" ]]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When version is bumped, ensure generated changelog is the same as committed |
||
echo "Error: Changelog is not the same as the generated result. Please run 'npm run gen-ipa-changelog' from the ipa directory and commit the changes." | ||
exit 1 | ||
fi | ||
exit 0 | ||
|
||
exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,13 +36,13 @@ | |
"auto-changelog": "2.5.0" | ||
}, | ||
"auto-changelog" : { | ||
"package" : true, | ||
"package": true, | ||
"commitPattern": "[a-z]+\\(ipa\\):", | ||
"startingVersion" : "0.0.1", | ||
"hideCredit": true, | ||
"tagPattern": "none", | ||
"startingVersion": "ipa-validation-ruleset-v1.0.0", | ||
"hideCredit": true, | ||
"tagPattern": "ipa-validation-ruleset-v\\d+\\.\\d+\\.\\d+", | ||
"tagPrefix": "ipa-validation-ruleset-v", | ||
"hideEmptyReleases" : true, | ||
"contributors": false, | ||
"changeCount": 0 | ||
"contributors": false | ||
Comment on lines
+39
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adjust to use tag prefix for changelog |
||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disallow any changes to changelog if version is not bumped