Skip to content

Commit

Permalink
Check op-program version in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ImTei committed Apr 16, 2024
1 parent 8b92197 commit bfb5473
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/scripts/check_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "Version in go.mod: $go_list_version"
cd $submodule_path
submodule_version=$(git rev-parse HEAD)
echo "Submodule commit: $submodule_version"
cd ..
cd ../../..

# Extract the commit hash from the go_list_version
# This regex assumes the hash is always after the last hyphen, which is typical for pseudo-versions
Expand All @@ -34,8 +34,19 @@ submodule_commit_part=$(echo $submodule_version | cut -c 1-$length)

# Compare the two commit parts
if [ "$go_list_commit" == "$submodule_commit_part" ]; then
echo "Versions match."
echo "git submodule and go mod versions match."
else
echo "Versions do not match."
echo "git submodule and go mod versions do not match."
exit 1
fi

op_program_test_version=$(cat tests/op-program-test/VERSION)
echo "op-program commit: $op_program_test_version"

# Compare the two commit parts
if [ "$op_program_test_version" == "$submodule_version" ]; then
echo "git submodule and op-program versions match."
else
echo "git submodule and op-program versions do not match."
exit 1
fi

0 comments on commit bfb5473

Please sign in to comment.