2016-03-27 12:20:57 +00:00
|
|
|
.PHONY: all
|
|
|
|
|
|
|
|
VERSION=0.0.1
|
|
|
|
|
|
|
|
DEPS := $(wildcard *.go)
|
|
|
|
BUILD_IMAGE := "gopush-build"
|
|
|
|
|
|
|
|
all: build
|
|
|
|
|
|
|
|
build: clean
|
2016-03-27 14:37:54 +00:00
|
|
|
sh script/build.sh
|
2016-03-27 12:20:57 +00:00
|
|
|
|
|
|
|
docker_build: clean
|
2016-03-27 14:37:54 +00:00
|
|
|
tar -zcvf build.tar.gz gopush.go gopush script
|
2016-03-27 12:20:57 +00:00
|
|
|
docker build -t $(BUILD_IMAGE) -f docker/Dockerfile.build .
|
|
|
|
docker run $(BUILD_IMAGE) > bin.tar.gz
|
|
|
|
tar -zxvf bin.tar.gz
|
2016-03-27 13:07:11 +00:00
|
|
|
-rm -rf bin.tar.gz build.tar.gz
|
2016-03-27 12:20:57 +00:00
|
|
|
|
2016-04-10 03:36:49 +00:00
|
|
|
test:
|
|
|
|
cd gopush && go test -v -covermode=count -coverprofile=coverage.out
|
|
|
|
|
2016-03-27 12:20:57 +00:00
|
|
|
clean:
|
|
|
|
rm -rf build.tar.gz bin.tar.gz bin/*
|