Skip to content

Commit

Permalink
workspace_status: work on mac os, upgrade hard-coded master version (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
jrockway authored Aug 23, 2024
1 parent c69adcf commit 5797701
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions workspace_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ echo "GIT_BRANCH $git_branch"
git_tree_status=$(git diff-index --quiet HEAD -- && echo 'Clean' || echo 'Modified')
echo "GIT_TREE_STATUS $git_tree_status"

exact=$(git describe --exact-match 2>/dev/null | sed -e s/^v// | cut -d - -f 1 || echo 2.11.0)
exact=$(git describe --exact-match 2>/dev/null | sed -e s/^v// | cut -d - -f 1 || echo 2.12.0)
echo "STABLE_APP_VERSION $exact"

additional_version=$(git describe --exact-match 2>/dev/null | cut -d - -f 2- || echo "pre.$(git describe --long --dirty=".$(git diff HEAD | sha256sum | cut -c 1-10)" | rev | cut -d - -f 1 | rev)")
SHA256SUM="sha256sum"
if command -v shasum &> /dev/null; then
# Mac OS ships shasum instead of sha256sum.
SHA256SUM="shasum -a 256"
fi

additional_version=$(git describe --exact-match 2>/dev/null | cut -d - -f 2- || echo "pre.$(git describe --long --dirty=".$(git diff HEAD | $SHA256SUM | cut -c 1-10)" | rev | cut -d - -f 1 | rev)")
echo "STABLE_ADDITIONAL_VERSION -$additional_version"

ci_runner_image_version="$(date +%Y%m%d)-${commit_sha}"
Expand Down

0 comments on commit 5797701

Please sign in to comment.