mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-26 02:03:37 +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
|
- id: ldflags
|
||||||
run: |
|
run: |
|
||||||
GIT_HASH=$(git rev-list -1 HEAD)
|
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.
|
# Trusted builder.
|
||||||
build:
|
build:
|
||||||
|
7
Makefile
7
Makefile
@ -1,8 +1,13 @@
|
|||||||
test:
|
test:
|
||||||
HISHTORY_TEST=1 go test -p 1 ./...
|
HISHTORY_TEST=1 go test -p 1 ./...
|
||||||
|
|
||||||
|
release:
|
||||||
|
expr `cat VERSION` + 1 > VERSION
|
||||||
|
git tag v0.`cat VERSION`
|
||||||
|
git push --tags
|
||||||
|
|
||||||
build-binary:
|
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
|
install: build-binary
|
||||||
web/landing/www/binaries/hishtory-linux install
|
web/landing/www/binaries/hishtory-linux install
|
||||||
|
Loading…
Reference in New Issue
Block a user