Skip to content

Commit

Permalink
tools: add version check for coffee.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
daywalker90 committed Jun 5, 2024
1 parent 0b9573b commit f5545b7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/tag-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,18 @@ fi

# Extract version from Cargo.toml [package] section
cargo_version=$(awk -F '"' '/^\[package\]/ {p=1} p && /version/ {print $2; exit}' Cargo.toml)
coffee_version=$(grep '^[[:space:]]*version:' coffee.yml | awk '{print $2}' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')

if [ "$cargo_version" != "$version" ]; then
echo "Version $version does not match the version in Cargo.toml"
exit 1
fi

if [ "$coffee_version" != "$version" ]; then
echo "Version $version does not match the version in coffee.yml"
exit 1
fi

# Check for pending changes
if has_pending_changes; then
echo "There are pending changes in the repository. Please commit or stash them before tagging."
Expand Down

0 comments on commit f5545b7

Please sign in to comment.