mirror of
https://github.com/Gu1llaum-3/sshm.git
synced 2025-10-19 01:17:20 +02:00
fix(ci): correct version injection in build workflow
- Change -X flag from cmd.version to cmd.AppVersion - This fixes version display showing 'dev' instead of actual version - Binaries will now display correct version when built via GitHub Actions
This commit is contained in:
parent
45eccabc23
commit
ed6ea2939a
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -71,9 +71,9 @@ jobs:
|
||||
# Remove 'v' prefix if present for version injection
|
||||
VERSION_CLEAN=${VERSION#v}
|
||||
if [ "${{ matrix.goos }}" = "windows" ]; then
|
||||
go build -ldflags="-s -w -X github.com/Gu1llaum-3/sshm/cmd.version=${VERSION_CLEAN}" -o dist/sshm-${{ matrix.suffix }}.exe .
|
||||
go build -ldflags="-s -w -X github.com/Gu1llaum-3/sshm/cmd.AppVersion=${VERSION_CLEAN}" -o dist/sshm-${{ matrix.suffix }}.exe .
|
||||
else
|
||||
go build -ldflags="-s -w -X github.com/Gu1llaum-3/sshm/cmd.version=${VERSION_CLEAN}" -o dist/sshm-${{ matrix.suffix }} .
|
||||
go build -ldflags="-s -w -X github.com/Gu1llaum-3/sshm/cmd.AppVersion=${VERSION_CLEAN}" -o dist/sshm-${{ matrix.suffix }} .
|
||||
fi
|
||||
|
||||
- name: Create archive
|
||||
|
Loading…
x
Reference in New Issue
Block a user