Skip to content

Commit

Permalink
Update check-version.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Custodio <[email protected]>
  • Loading branch information
leonardocustodio authored Nov 11, 2024
1 parent 75d7d55 commit 015002c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/check-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ jobs:
compare_version=$(echo "$json_data" | jq -r '.tag_name' | sed 's/^v//')
# Compare versions
if [ "$(printf '%s\n' "$version" "$compare_version" | sort -V | head -n 1)" = "$version" ] && [ "$version" != "$compare_version" ]; then
exit 1
if [ "$(printf '%s\n' "$version" "$compare_version" | sort -V | head -n 1)" = "$version" ]; then
if [ "$version" != "$compare_version" ]; then
echo "The version in Cargo.toml ($version) is lower than $compare_version"
exit 1
else
echo "The version in Cargo.toml ($version) is equal to $compare_version"
exit 1
fi
else
echo "The version in Cargo.toml ($version) is higher than $compare_version"
fi

0 comments on commit 015002c

Please sign in to comment.