-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve Application Versioning (#171)
* Improve Application Versioning This will allow for better bug reports and information the binary running. This information can be retrieved upon providing the -v or --version flag * fixup: fix update-version and use variables to be more consistent
- Loading branch information
1 parent
7d6eecc
commit 62263ec
Showing
6 changed files
with
152 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,15 @@ FROM golang:alpine as builder | |
MAINTAINER Jack Murdock <[email protected]> | ||
|
||
WORKDIR /go/src/github.com/xmidt-org/caduceus | ||
ARG VERSION=undefined | ||
ARG GITCOMMIT=undefined | ||
ARG BUILDTIME=undefined | ||
|
||
RUN apk update && apk upgrade && \ | ||
apk add --no-cache bash git openssh | ||
|
||
COPY . . | ||
RUN GO111MODULE=on go build -o caduceus_linux_amd64 | ||
RUN GO111MODULE=on go build -ldflags "-X 'main.BuildTime=${BUILDTIME}' -X main.GitCommit=${GITCOMMIT} -X main.Version=${VERSION}" -o caduceus_linux_amd64 | ||
|
||
FROM alpine | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,15 @@ FROM golang:alpine as builder | |
MAINTAINER Jack Murdock <[email protected]> | ||
|
||
WORKDIR /go/src/github.com/xmidt-org/caduceus | ||
ARG VERSION=undefined | ||
ARG GITCOMMIT=undefined | ||
ARG BUILDTIME=undefined | ||
|
||
RUN apk add --update git curl | ||
|
||
COPY . . | ||
|
||
RUN go build -o caduceus_linux_amd64 | ||
RUN go build -ldflags "-X 'main.BuildTime=${BUILDTIME}' -X main.GitCommit=${GITCOMMIT} -X main.Version=${VERSION}" -o caduceus_linux_amd64 | ||
|
||
FROM alpine | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters