Skip to content

Commit

Permalink
match whole package name, not substrings in mod version action (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Apr 17, 2024
1 parent 5874ff7 commit b6e5189
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions chainlink-testing-framework/mod-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ runs:
run: |
cd ${go_project_path}
# Extract the version of the package from go.mod
version=$(grep $package_name go.mod | awk '{print $2}')
echo "Found version: $version"
version=$(grep "$package_name " go.mod | awk '{print $2}')
# Check if version is empty
if [ -z "$version" ]; then
echo "There is no version for ${{ inputs.module-name }}"
echo "There is no version for $package_name"
exit 1 # Exit with a failure code
else
echo "Found version: $version"
fi
echo "version=${version}" >>$GITHUB_OUTPUT
- name: Enforce Semantic version
Expand Down

0 comments on commit b6e5189

Please sign in to comment.