File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -32,15 +32,14 @@ jobs:
3232 run : |
3333 VERSION=$(git describe --abbrev=0 --tags $(git rev-list --tags --max-count=1) | tr -d v)
3434 [ "$VERSION" != "" ] || VERSION=0.0.0
35- ITERATION=$(git rev-list --count --all || echo 0)
36- COMMIT="$(git rev-parse --short HEAD || echo 0)"
37- BRANCH="$(git rev-parse --abbrev-ref HEAD || echo unknown)"
35+ REVISION=$(git rev-list --count --all || echo 0)
36+ COMMIT=$(echo "${{github.sha}}" | head -c 7)
3837 jq ".info.productVersion = \"${VERSION}\"" wails.json > wails.json.new
3938 mv wails.json.new wails.json
40- VERSION_LDFLAGS="-X \"golift.io/version.Branch=${BRANCH} ${COMMIT}\" \
39+ VERSION_LDFLAGS="-X \"golift.io/version.Branch=${{github.ref_name}} \( ${COMMIT}\) \" \
4140 -X \"golift.io/version.BuildDate=$(date -u +%Y-%m-%dT%H:%M:00Z)\" \
4241 -X \"golift.io/version.BuildUser=$(whoami || echo "unknown")\" \
43- -X \"golift.io/version.Revision=${ITERATION }\" \
42+ -X \"golift.io/version.Revision=${REVISION }\" \
4443 -X \"golift.io/version.Version=${VERSION}\""
4544 echo "VERSION_LDFLAGS=${VERSION_LDFLAGS}" >> $GITHUB_ENV
4645
You can’t perform that action at this time.
0 commit comments