Merge pull request #1 from benzcash/ben/Makefile-version-vars
Ben/makefile version vars
This commit is contained in:
commit
10e06e385c
|
@ -3,5 +3,4 @@ FROM golang:1.13
|
|||
ADD . /workspace/cloudlog
|
||||
WORKDIR /workspace/cloudlog
|
||||
RUN make build
|
||||
# Testing
|
||||
ENTRYPOINT ["/workspace/cloudlog/cloudlog"]
|
||||
|
|
7
Makefile
7
Makefile
|
@ -1,11 +1,10 @@
|
|||
SHELL := /bin/bash
|
||||
|
||||
VERSION := $(CI_COMMIT_TAG)
|
||||
GITCOMMIT := $(git rev-list -1 HEAD)
|
||||
BRANCH := $(CI_COMMIT_BRANCH)
|
||||
VERSION := `git describe --always`
|
||||
GITCOMMIT := `git rev-parse HEAD`
|
||||
BRANCH := `git rev-parse --abbrev-ref HEAD`
|
||||
BUILDDATE := `date +%Y-%m-%d`
|
||||
BUILDUSER := `whoami`
|
||||
PROJECT_ROOT := github.com/benzcash/cloudlog
|
||||
|
||||
LDFLAGSSTRING :=-X main.Version=$(VERSION)
|
||||
LDFLAGSSTRING +=-X main.GitCommit=$(GITCOMMIT)
|
||||
|
|
Loading…
Reference in New Issue