Skip to content

Commit

Permalink
Fix grep for version number in docker build (#15699)
Browse files Browse the repository at this point in the history
Grep now only returns _first_ result and "version" has to be at start of
line.
  • Loading branch information
dylwil3 authored Jan 23, 2025
1 parent b5ffb40 commit 9058937
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
env:
TAG: ${{ inputs.plan != '' && fromJson(inputs.plan).announcement_tag || 'dry-run' }}
run: |
version=$(grep "version = " pyproject.toml | sed -e 's/version = "\(.*\)"/\1/g')
version=$(grep -m 1 "^version = " pyproject.toml | sed -e 's/version = "\(.*\)"/\1/g')
if [ "${TAG}" != "${version}" ]; then
echo "The input tag does not match the version from pyproject.toml:" >&2
echo "${TAG}" >&2
Expand Down

0 comments on commit 9058937

Please sign in to comment.