-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compile time versioning * Add LDFLAGS to CI script, bring everything else in line with that method * Remove docker-entrypoint.sh
- Loading branch information
Showing
10 changed files
with
50 additions
and
29 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
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 |
---|---|---|
@@ -1,10 +1,8 @@ | ||
FROM alpine:3.8 | ||
|
||
RUN apk add --update ca-certificates | ||
RUN apk --no-cache add --update ca-certificates | ||
|
||
COPY dist/iris_linux_386/iris /usr/local/bin/ | ||
COPY hack/docker_entrypoint.sh /entrypoint.sh | ||
COPY VERSION /VERSION | ||
|
||
ENTRYPOINT ["sh", "entrypoint.sh"] | ||
CMD [ "--help" ] | ||
ENTRYPOINT ["/usr/local/bin/iris"] | ||
CMD [ "--help" ] |
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 |
---|---|---|
@@ -1 +1 @@ | ||
0.6.1 | ||
0.7.0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
set -e | ||
OUTFILE=/usr/local/bin/irisctl | ||
go build -o $OUTFILE main.go | ||
|
||
chmod +x $OUTFILE | ||
OUTFILE=${1:-/usr/local/bin/irisctl} | ||
BUILD_DATE=$(date) | ||
GIT_TAG=$(git describe --tags) | ||
GIT_COMMIT=$(git rev-parse --short HEAD) | ||
|
||
LDFLAGS="-s -w | ||
-X 'github.com/olegsu/iris/pkg/util.BuildVersion=${GIT_TAG}' | ||
-X 'github.com/olegsu/iris/pkg/util.BuildDate=${BUILD_DATE}' | ||
-X 'github.com/olegsu/iris/pkg/util.BuildCommit=${GIT_COMMIT}' | ||
-X 'github.com/olegsu/iris/pkg/util.BuildBy=Makefile' | ||
" | ||
|
||
go build -ldflags "$LDFLAGS" -o "$OUTFILE" main.go |
This file was deleted.
Oops, something went wrong.
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