Skip to content

Commit

Permalink
point at top-level Cargo.toml for version check (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricBolten authored Feb 4, 2024
1 parent f9b55d2 commit dd8046a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/check_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

# this is a little fragile because it assumes the [package] section will be at the
# top of the Cargo.toml
BINARY_VERSION_STRING=$(cat steward/Cargo.toml | grep "^\(version = \"\)\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\(?:-\([0-9A-Za-z-]\+\(?:\.[0-9A-Za-z-]\+\)*\)\)\?\(?:\+[0-9A-Za-z-]\+\)\?" | head -1)
BINARY_VERSION_STRING=$(cat Cargo.toml | grep "^\(version = \"\)\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\(?:-\([0-9A-Za-z-]\+\(?:\.[0-9A-Za-z-]\+\)*\)\)\?\(?:\+[0-9A-Za-z-]\+\)\?" | head -1)
# above output is 'version = "x.x.x"' so we trim the leading and trailing characters
BINARY_VERSION=${BINARY_VERSION_STRING:11:-1}
# trim the leading 'v' from the tag
Expand Down

0 comments on commit dd8046a

Please sign in to comment.