From aa067436a7cceed0deccd0532e4119ff30f4859f Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Mon, 4 Nov 2024 13:43:57 +0900 Subject: [PATCH] workflows: build all packages with full ldflags Signed-off-by: Ophestra Umiker --- .gitea/workflows/release.yml | 10 ++++++++-- .gitea/workflows/test.yml | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a412f33..b7b3e0f 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -30,8 +30,14 @@ jobs: - name: Build for Linux run: >- - sh -c "go build -v -ldflags '-s -w -X main.Version=${{ github.ref_name }}' -o bin/fortify && - sha256sum --tag -b bin/fortify > bin/fortify.sha256" + go build -v -ldflags '-s -w + -X git.ophivana.moe/security/fortify/internal.Version=${{ github.ref_name }} + -X git.ophivana.moe/security/fortify/internal.Fsu=/usr/bin/fsu + -X git.ophivana.moe/security/fortify/internal.Fshim=/usr/libexec/fortify/fshim + -X git.ophivana.moe/security/fortify/internal.Finit=/usr/libexec/fortify/finit + -X main.Fmain=/usr/bin/fortify' + -o bin/ ./... && + (cd bin && sha512sum --tag -b * > sha512sums) - name: Release id: use-go-action diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index d9b1379..70e51d3 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -33,5 +33,11 @@ jobs: - name: Build for Linux run: >- - sh -c "go build -v -ldflags '-s -w -X main.Version=${{ github.ref_name }}' -o bin/fortify && - sha256sum --tag -b bin/fortify > bin/fortify.sha256" + go build -v -ldflags '-s -w + -X git.ophivana.moe/security/fortify/internal.Version=${{ github.ref_name }} + -X git.ophivana.moe/security/fortify/internal.Fsu=/usr/bin/fsu + -X git.ophivana.moe/security/fortify/internal.Fshim=/usr/libexec/fortify/fshim + -X git.ophivana.moe/security/fortify/internal.Finit=/usr/libexec/fortify/finit + -X main.Fmain=/usr/bin/fortify' + -o bin/ ./... && + (cd bin && sha512sum --tag -b * > sha512sums)