crowdsec: Correct versioning flags in build

This commit is contained in:
Varun Madiath 2023-07-17 20:30:21 -04:00
parent 635a81d673
commit 4932b98c46

View File

@ -23,8 +23,12 @@ buildGoModule rec {
ldflags = [
"-s"
"-w"
"-X github.com/crowdsecurity/crowdsec/pkg/cwversion.Version=v${version}"
"-X github.com/crowdsecurity/crowdsec/pkg/cwversion.BuildDate=1970-01-01_00:00:00"
"-X github.com/crowdsecurity/go-cs-lib/pkg/version.Version=v${version}"
"-X github.com/crowdsecurity/go-cs-lib/pkg/version.BuildDate=1970-01-01_00:00:00"
"-X github.com/crowdsecurity/go-cs-lib/pkg/version.Tag=${src.rev}"
"-X github.com/crowdsecurity/crowdsec/pkg/cwversion.Codename=alphaga"
"-X github.com/crowdsecurity/crowdsec/pkg/csconfig.defaultConfigDir=/etc/crowdsec"
"-X github.com/crowdsecurity/crowdsec/pkg/csconfig.defaultDataDir=/var/lib/crowdsec/data"
];
postBuild = "mv $GOPATH/bin/{crowdsec-cli,cscli}";