another attempt at ldflags

This commit is contained in:
David Dworken 2022-04-08 22:45:49 -07:00
parent c42bb66e96
commit f2c6f86204
3 changed files with 6 additions and 4 deletions

View File

@ -20,9 +20,7 @@ jobs:
fetch-depth: 0
- id: ldflags
run: |
GIT_HASH=$(git rev-list -1 HEAD)
LD_FLAGS="-X main.GitCommit=$GIT_HASH -w -extldflags \"-static\""
echo "::set-output name=value::$LD_FLAGS"
echo "::set-output name=ldflags::$(./scripts/client-ldflags)"
# Trusted builder.
build:

View File

@ -1 +1 @@
4
5

4
scripts/client-ldflags Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
GIT_HASH=$(git rev-parse HEAD)
echo "-X main.GitCommit=$GIT_HASH -w -extldflags \"-static\""