Skip to content

Commit

Permalink
On build use version set in pkg/version
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprodan committed Sep 27, 2018
1 parent 2671723 commit 68b853f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ WORKDIR /go/src/github.com/stefanprodan/steerer

COPY . .

RUN VERSION=$(git describe --all --exact-match `git rev-parse HEAD` | grep tags | sed 's/tags\///') && \
GIT_COMMIT=$(git rev-list -1 HEAD) && \
RUN GIT_COMMIT=$(git rev-list -1 HEAD) && \
CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w \
-X github.com/stefanprodan/steerer/pkg/version.VERSION=${VERSION} \
-X github.com/stefanprodan/steerer/pkg/version.REVISION=${GIT_COMMIT}" \
-a -installsuffix cgo -o steerer ./cmd/steerer/*

Expand Down

0 comments on commit 68b853f

Please sign in to comment.