fix version numbers in CI builds

This commit is contained in:
Finn 2021-02-02 21:54:42 -08:00
parent 6b57747ea2
commit 80847206e6

View file

@ -24,7 +24,7 @@ build:x86:
- cp -r * /go/src/gitlab.com/signald/signald-go
- cd /go/src/gitlab.com/signald/signald-go
script:
- go build -o "${CI_PROJECT_DIR}/signaldctl" ./cmd/signaldctl
- go build -o "${CI_PROJECT_DIR}/signaldctl" --ldflags "-X gitlab.com/signald/signald-go/cmd/signaldctl/common.Version=$(git -C ${CI_PROJECT_DIR} describe) -X gitlab.com/signald/signald-go/cmd/signaldctl/common.Branch=${CI_COMMIT_BRANCH} -X gitlab.com/signald/signald-go/cmd/signaldctl/common.Commit=${CI_COMMIT_SHA}" ./cmd/signaldctl
artifacts:
paths:
- signaldctl
@ -38,8 +38,7 @@ build:cross-compile:
- cp -r * /go/src/gitlab.com/signald/signald-go
- cd /go/src/gitlab.com/signald/signald-go
script:
- make signaldctl
- mv signaldctl "${CI_PROJECT_DIR}/signaldctl-${GOOS}-${GOARCH}"
- go build -o "${CI_PROJECT_DIR}/signaldctl-${GOOS}-${GOARCH}" --ldflags "-X gitlab.com/signald/signald-go/cmd/signaldctl/common.Version=$(git -C ${CI_PROJECT_DIR} describe) -X gitlab.com/signald/signald-go/cmd/signaldctl/common.Branch=${CI_COMMIT_BRANCH} -X gitlab.com/signald/signald-go/cmd/signaldctl/common.Commit=${CI_COMMIT_SHA}" ./cmd/signaldctl
artifacts:
paths:
- signaldctl-*
@ -63,7 +62,7 @@ build:aarch64:
- cp -r * /go/src/gitlab.com/signald/signald-go
- cd /go/src/gitlab.com/signald/signald-go
script:
- go build -o "${CI_PROJECT_DIR}/signaldctl" ./cmd/signaldctl
- go build -o "${CI_PROJECT_DIR}/signaldctl" --ldflags "-X gitlab.com/signald/signald-go/cmd/signaldctl/common.Version=$(git -C ${CI_PROJECT_DIR} describe) -X gitlab.com/signald/signald-go/cmd/signaldctl/common.Branch=${CI_COMMIT_BRANCH} -X gitlab.com/signald/signald-go/cmd/signaldctl/common.Commit=${CI_COMMIT_SHA}" ./cmd/signaldctl
artifacts:
paths:
- signaldctl