-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
manos
committed
Apr 5, 2018
1 parent
44bfe09
commit 78c3e24
Showing
5 changed files
with
33 additions
and
33 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
FROM scratch | ||
ADD ca-certificates.crt /etc/ssl/certs/ | ||
ADD pingdom2mysql-docker / | ||
ENTRYPOINT ["/pingdom2mysql-docker"] | ||
ADD pingdom2stats-docker / | ||
ENTRYPOINT ["/pingdom2stats-docker"] | ||
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,33 +1,33 @@ | ||
VERSION=$(shell git describe --tags) | ||
DOCKER_REPO="" | ||
pingdom2mysql: *.go | ||
pingdom2stats: *.go | ||
go build -ldflags "-X main.version=$(VERSION)" | ||
|
||
version: | ||
@echo $(VERSION) | ||
|
||
run: pingdom2mysql | ||
./pingdom2mysql --help | ||
run: pingdom2stats | ||
./pingdom2stats --help | ||
|
||
pingdom2mysql-osx: *.go | ||
pingdom2stats-osx: *.go | ||
GOOS=darwin GOARCH=amd64 go build -o $@ -ldflags "-X main.VERSION=$(VERSION)" | ||
|
||
pingdom2mysql-armv6: *.go | ||
pingdom2stats-armv6: *.go | ||
GOOS=linux GOARCH=arm GOARM=6 go build -o $@ -ldflags "-X main.VERSION=$(VERSION)" | ||
|
||
pingdom2mysql-x86: *.go | ||
pingdom2stats-x86: *.go | ||
GOOS=linux GOARCH=386 go build -o $@ -ldflags "-X main.VERSION=$(VERSION)" | ||
|
||
pingdom2mysql-amd64: *.go | ||
pingdom2stats-amd64: *.go | ||
GOOS=linux GOARCH=amd64 go build -o $@ -ldflags "-X main.VERSION=$(VERSION)" | ||
|
||
pingdom2mysql-docker: | ||
pingdom2stats-docker: | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o $@ -ldflags "-X main.VERSION=$(VERSION)" | ||
docker build --tag $(DOCKER_REPO)pingdom2mysql:$(VERSION) . | ||
docker tag $(DOCKER_REPO)pingdom2mysql:$(VERSION) $(DOCKER_REPO)pingdom2mysql:latest | ||
docker build --tag $(DOCKER_REPO)pingdom2stats:$(VERSION) . | ||
docker tag $(DOCKER_REPO)pingdom2stats:$(VERSION) $(DOCKER_REPO)pingdom2stats:latest | ||
|
||
build-all: pingdom2mysql-armv6 pingdom2mysql-osx pingdom2mysql-x86 pingdom2mysql-amd64 | ||
# pingdom2mysql-docker | ||
build-all: pingdom2stats-armv6 pingdom2stats-osx pingdom2stats-x86 pingdom2stats-amd64 | ||
# pingdom2stats-docker | ||
|
||
|
||
.PHONY: version run build-all pingdom2mysql-docker | ||
.PHONY: version run build-all pingdom2stats-docker |
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