Skip to content

Commit

Permalink
improve check-versioning-lib-release
Browse files Browse the repository at this point in the history
  • Loading branch information
plebhash committed May 23, 2024
1 parent d432fa8 commit c7870bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions check-versioning-lib-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ for crate in "${crates[@]}"; do
version_dev=$(git show origin/dev:./Cargo.toml | awk -F' = ' '$1 == "version" {gsub(/[ "]+/, "", $2); print $2}')
version_main=$(git show origin/main:./Cargo.toml | awk -F' = ' '$1 == "version" {gsub(/[ "]+/, "", $2); print $2}')
if [ "$version_dev" = "$version_main" ]; then
# this prevents the release PR from being merged, since we do `exit 1`, effectively stopping the Github CI
echo "Changes detected in crate $crate between dev and main branches! Versions on dev and main branches are identical ($version_dev), so you should bump the crate version on dev before merging into main."
exit 1
else
# this creates a log of version changes, useful for release logs
echo "Changes detected in crate $crate between dev and main branches! Version in dev is: ($version_dev), while version in main is ($version_main)."
fi
fi

Expand Down

0 comments on commit c7870bb

Please sign in to comment.