Skip to content

Commit

Permalink
updated version details. version is nightly and buildTime is calculated
Browse files Browse the repository at this point in the history
  • Loading branch information
nida authored and gorkem committed Feb 13, 2024
1 parent ed9f0d0 commit dadcae1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/nightly-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ jobs:

- name: Cross-compile
run: |
version="$(git describe --no-match --always --abbrev=9 --dirty --broken 2>/dev/null || git rev-parse --short HEAD 2>/dev/null)-nightly"
version="nightly"
gitCommit=$(git rev-parse HEAD)
buildTime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
binName="jmm-$GOOS-$GOARCH"
if [ $GOOS == "windows" ]; then
binName="${binName}.exe"
fi
go build -o "$binName" \
ldflags="-s -w -X 'pkg/cmd/version.Version=${version}' -X 'pkg/cmd/version.GitCommit=${gitCommit}' -X 'pkg/cmd/version.BuildTime=${buildTime}'"
-ldflags="-s -w -X 'pkg/cmd/version.Version=${version}' -X 'pkg/cmd/version.GitCommit=${gitCommit}' -X 'pkg/cmd/version.BuildTime=${buildTime}'"
- name: Generate archive
run: |
Expand Down

0 comments on commit dadcae1

Please sign in to comment.