mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-22 16:24:00 +01:00
trying again to make ldflags work with slsa
This commit is contained in:
parent
c3d232ea36
commit
13d766a9c8
3
.github/workflows/slsa-goreleaser.yml
vendored
3
.github/workflows/slsa-goreleaser.yml
vendored
@ -21,7 +21,8 @@ jobs:
|
||||
- id: ldflags
|
||||
run: |
|
||||
GIT_HASH=$(git rev-list -1 HEAD)
|
||||
echo "-X main.GitCommit=$GIT_HASH -w -extldflags \"-static\""
|
||||
LD_FLAGS="-X main.GitCommit=$GIT_HASH -w -extldflags \"-static\""
|
||||
echo "::set-output name=value::$LD_FLAGS"
|
||||
|
||||
# Trusted builder.
|
||||
build:
|
||||
|
7
Makefile
7
Makefile
@ -1,8 +1,13 @@
|
||||
test:
|
||||
HISHTORY_TEST=1 go test -p 1 ./...
|
||||
|
||||
release:
|
||||
expr `cat VERSION` + 1 > VERSION
|
||||
git tag v0.`cat VERSION`
|
||||
git push --tags
|
||||
|
||||
build-binary:
|
||||
go build -trimpath -o web/landing/www/binaries/hishtory-linux -ldflags "-X main.GitCommit=`git rev-list -1 HEAD`"
|
||||
go build -trimpath -o web/landing/www/binaries/hishtory-linux #-ldflags "-X main.GitCommit=`git rev-list -1 HEAD`"
|
||||
|
||||
install: build-binary
|
||||
web/landing/www/binaries/hishtory-linux install
|
||||
|
Loading…
Reference in New Issue
Block a user