-
Notifications
You must be signed in to change notification settings - Fork 165
Check in CI if changelogs need a bump #5311
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
Open
Lucsanszky
wants to merge
7
commits into
master
Choose a base branch
from
ldan/check-changelogs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+26
−18
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7f7dc93
Check in CI if changelogs need a bump
Lucsanszky 3bac5fa
Minor
Lucsanszky e90107c
Update scripts/bump-changelogs.sh
Lucsanszky 191c6ca
Update scripts/bump-changelogs.sh
Lucsanszky 15c35ff
Add suggestions from code review
Lucsanszky 7b233b8
WIP: Demonstrate changelog check
Lucsanszky c0b7ef8
Minor
Lucsanszky 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
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 |
---|---|---|
@@ -1,9 +1,5 @@ | ||
# Version history for `small-steps` | ||
|
||
## 1.1.2.1 | ||
|
||
* | ||
|
||
## 1.1.2.0 | ||
|
||
* Add `whenFailureFreeDefault` | ||
|
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 |
---|---|---|
@@ -1,18 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
CHAP=./cardano-haskell-packages | ||
# Download a shallow copy of CHaP | ||
git clone --depth 1 [email protected]:IntersectMBO/cardano-haskell-packages.git $CHAP | ||
|
||
cd $CHAP || exit | ||
# Save all the available packages from CHaP | ||
CHAP_PACKAGES=$(./scripts/list-packages.sh) | ||
cd - || exit | ||
echo "The following packages are available in CHaP:" | ||
CHAP_PACKAGES=$(mktemp) | ||
trap 'rm -f "$CHAP_PACKAGES"' EXIT | ||
|
||
if tar --version | grep -q 'GNU tar' | ||
then | ||
tar () { command tar --wildcards "$@"; } | ||
fi | ||
|
||
curl -sSL https://chap.intersectmbo.org/01-index.tar.gz | | ||
tar -tz \*.cabal | | ||
cut -d/ -f1-2 | | ||
LANG=C sort -t/ -k1,1 -k2,2Vr | | ||
LANG=C sort -t/ -k1,1 -u -o "$CHAP_PACKAGES" | ||
echo "The complete CHaP package index is here:" | ||
echo "$CHAP_PACKAGES" | ||
|
||
# Save the paths to every `cardano-ledger` cabal file | ||
CABAL_FILES=$(find . -wholename '*/eras/*.cabal' -o -wholename '*/libs/*.cabal') | ||
CABAL_FILES=$(git ls-files '*.cabal') | ||
|
||
for i in $CABAL_FILES; | ||
do | ||
|
@@ -29,7 +35,7 @@ do | |
# Check if the package had a release with | ||
# the most recent `CHANGELOG` version number | ||
printf "Looking for %s with version %s in CHaP\n" "$PACKAGE" "$VERSION" | ||
RESULT=$(echo "$CHAP_PACKAGES" | grep -o "$PACKAGE $VERSION") | ||
RESULT=$(grep -o "$PACKAGE/$VERSION" "$CHAP_PACKAGES") | ||
if [[ -n "$RESULT" ]]; then | ||
# A release was found and thus the `CHANGELOG` has to be bumped | ||
# with the incremented patch version | ||
|
@@ -40,7 +46,10 @@ do | |
fi | ||
done | ||
|
||
rm -rf $CHAP | ||
printf "\n!!!!!!\n%s %s\n!!!!!!\n" \ | ||
"WARNING! DO NOT BUMP THE VERSION NUMBER IN THE CABAL FILES" \ | ||
"(unless its dependencies were bumped)!" | ||
set -euo pipefail | ||
|
||
if ! git diff -s --exit-code; then | ||
printf "\n!!!!!!\n%s %s\n!!!!!!\n" \ | ||
"WARNING! DO NOT BUMP THE VERSION NUMBER IN THE CABAL FILES" \ | ||
"(unless their dependencies were bumped)!" | ||
fi |
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.
Removing this section is not correct. So, this change is here to test whether this new CI check works correctly or not, right?