2017-05-10 17:12:34 +08:00
|
|
|
all: build push clean
|
|
|
|
.PHONY: build push clean
|
|
|
|
|
|
|
|
TAG = v2
|
|
|
|
|
|
|
|
# Build for linux amd64
|
|
|
|
build:
|
|
|
|
GOOS=linux GOARCH=amd64 go build -o hello${TAG} main.go
|
2018-05-04 19:48:54 +08:00
|
|
|
docker build -t harbor-001.jimmysong.io/library/hello:${TAG} .
|
2017-05-10 17:12:34 +08:00
|
|
|
|
|
|
|
# Push to tenxcloud
|
|
|
|
push:
|
2018-05-04 19:48:54 +08:00
|
|
|
docker push harbor-001.jimmysong.io/library/hello:${TAG}
|
2017-05-10 17:12:34 +08:00
|
|
|
|
|
|
|
# Clean
|
|
|
|
clean:
|
|
|
|
rm -f hello${TAG}
|