-
Notifications
You must be signed in to change notification settings - Fork 886
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from oliver006/oh_use_glide_for_vendoring
Use glide for vendoring
- Loading branch information
Showing
4 changed files
with
110 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
|
||
|
||
echo "Building binaries" | ||
echo "" | ||
echo $GO_LDFLAGS | ||
|
||
|
||
gox --osarch="darwin/amd64" -ldflags "$GO_LDFLAGS" -output "dist/redis_exporter" && cd dist && tar -cvzf redis_exporter-$CIRCLE_TAG.darwin-amd64.tar.gz redis_exporter && rm redis_exporter && cd .. | ||
gox --osarch="darwin/386" -ldflags "$GO_LDFLAGS" -output "dist/redis_exporter" && cd dist && tar -cvzf redis_exporter-$CIRCLE_TAG.darwin-386.tar.gz redis_exporter && rm redis_exporter && cd .. | ||
gox --osarch="linux/amd64" -ldflags "$GO_LDFLAGS" -output "dist/redis_exporter" && cd dist && tar -cvzf redis_exporter-$CIRCLE_TAG.linux-amd64.tar.gz redis_exporter && rm redis_exporter && cd .. | ||
gox --osarch="linux/386" -ldflags "$GO_LDFLAGS" -output "dist/redis_exporter" && cd dist && tar -cvzf redis_exporter-$CIRCLE_TAG.linux-386.tar.gz redis_exporter && rm redis_exporter && cd .. | ||
gox --osarch="netbsd/amd64" -ldflags "$GO_LDFLAGS" -output "dist/redis_exporter" && cd dist && tar -cvzf redis_exporter-$CIRCLE_TAG.netbsd-amd64.tar.gz redis_exporter && rm redis_exporter && cd .. | ||
gox --osarch="netbsd/386" -ldflags "$GO_LDFLAGS" -output "dist/redis_exporter" && cd dist && tar -cvzf redis_exporter-$CIRCLE_TAG.netbsd-386.tar.gz redis_exporter && rm redis_exporter && cd .. | ||
gox --osarch="windows/amd64" -ldflags "$GO_LDFLAGS" -output "dist/redis_exporter" && cd dist && zip -9 redis_exporter-$CIRCLE_TAG.windows-amd64.zip redis_exporter.exe && rm redis_exporter.exe && cd .. | ||
gox --osarch="windows/386" -ldflags "$GO_LDFLAGS" -output "dist/redis_exporter" && cd dist && zip -9 redis_exporter-$CIRCLE_TAG.windows-386.zip redis_exporter.exe && rm redis_exporter.exe && cd .. | ||
|
||
echo "Upload to Github" | ||
ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace $CIRCLE_TAG dist/ | ||
|
||
|
||
docker version | ||
|
||
gox --osarch="linux/386" -ldflags "$GO_LDFLAGS" -output "dist/redis_exporter" | ||
|
||
echo "Build Docker images" | ||
docker build --rm=false -t "21zoo/redis_exporter:$CIRCLE_TAG" . | ||
docker build --rm=false -t "21zoo/redis_exporter:latest" . | ||
|
||
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS | ||
docker push "21zoo/redis_exporter:latest" | ||
docker push "21zoo/redis_exporter:$CIRCLE_TAG" | ||
|
||
docker build --rm=false -t "oliver006/redis_exporter:$CIRCLE_TAG" . | ||
docker build --rm=false -t "oliver006/redis_exporter:latest" . | ||
docker push "oliver006/redis_exporter:latest" | ||
docker push "oliver006/redis_exporter:$CIRCLE_TAG" | ||
|
||
echo "Done" |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package: github.com/oliver006/redis_exporter | ||
import: | ||
- package: github.com/Sirupsen/logrus | ||
version: v0.11.0 | ||
- package: github.com/garyburd/redigo | ||
version: v1.0.0 | ||
subpackages: | ||
- redis | ||
- package: github.com/prometheus/client_golang | ||
version: v0.8.0 | ||
subpackages: | ||
- prometheus | ||
testImport: | ||
- package: github.com/prometheus/client_model | ||
subpackages: | ||
- go |