Created
April 5, 2016 17:17
-
-
Save saml/dc2705e7b1c14d81675ee69457cc1cd4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
version="${VERSION:-$(git describe --tags --abbrev=0)}" | |
revision="${REVISION:-$(git rev-parse HEAD)}" | |
builddate="$(date)" | |
wgo restore && | |
wgo test ./ && | |
wgo build -ldflags "-X \"main.appVersion=$version\" -X \"main.appRevision=$revision\" -X \"main.appBuildDate=$builddate\"" |
This file contains hidden or 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
machine: | |
environment: | |
IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" | |
checkout: | |
post: | |
- mkdir -p "${GOPATH%%:*}/src/$IMPORT_PATH" | |
- rsync -avz --delete ./ "${GOPATH%%:*}/src/$IMPORT_PATH/" | |
dependencies: | |
override: | |
- go get -v github.com/skelterjohn/wgo | |
test: | |
override: | |
- ./build.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment