Commit 2c4700e9 authored by Julien Schröter's avatar Julien Schröter

Pass version information to executable when CI builds the project

parent 4b8a6d55
Pipeline #1811 passed with stages
in 23 minutes and 51 seconds
......@@ -70,9 +70,9 @@ compile:
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}".insteadOf ""
- go get ./...
- GOOS=linux GOARCH=amd64 go build -tags netgo -a -ldflags "-extldflags '-static'" -o $CI_PROJECT_DIR/linux
- GOOS=darwin GOARCH=amd64 go build -o $CI_PROJECT_DIR/darwin
- GOOS=windows GOARCH=amd64 go build -o $CI_PROJECT_DIR/windows.exe
- GOOS=linux GOARCH=amd64 go build -tags netgo -a -ldflags "-extldflags '-static' -X '$(< MILESTONE)' -X '$CI_COMMIT_SHORT_SHA' -X '$CI_COMMIT_REF_NAME' -X '$CI_PIPELINE_ID' -X '$CI_JOB_ID' -X '$(date)'" -o $CI_PROJECT_DIR/linux
- GOOS=darwin GOARCH=amd64 go build -ldflags "-X '$(< MILESTONE)' -X '$CI_COMMIT_SHORT_SHA' -X '$CI_COMMIT_REF_NAME' -X '$CI_PIPELINE_ID' -X '$CI_JOB_ID' -X '$(date)'" -o $CI_PROJECT_DIR/darwin
- GOOS=windows GOARCH=amd64 go build -ldflags "-X '$(< MILESTONE)' -X '$CI_COMMIT_SHORT_SHA' -X '$CI_COMMIT_REF_NAME' -X '$CI_PIPELINE_ID' -X '$CI_JOB_ID' -X '$(date)'" -o $CI_PROJECT_DIR/windows.exe
- linux
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment