From e057b3ceb736ddc6991ad400fb19f57461a32af4 Mon Sep 17 00:00:00 2001 From: daywalker90 <8257956+daywalker90@users.noreply.github.com> Date: Wed, 5 Jun 2024 14:30:05 +0200 Subject: [PATCH] tools: add version check for coffee.yml --- tools/tag-release.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/tag-release.sh b/tools/tag-release.sh index 1ceef32..fb98b3c 100755 --- a/tools/tag-release.sh +++ b/tools/tag-release.sh @@ -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."