2014-07-22 20:35:00 +00:00
|
|
|
NAME=registrator
|
2015-02-18 17:53:03 +00:00
|
|
|
VERSION=$(shell cat VERSION)
|
2015-08-14 15:18:41 +00:00
|
|
|
DEV_RUN_OPTS ?= consul:
|
2015-02-18 17:53:03 +00:00
|
|
|
|
|
|
|
dev:
|
|
|
|
docker build -f Dockerfile.dev -t $(NAME):dev .
|
|
|
|
docker run --rm \
|
|
|
|
-v /var/run/docker.sock:/tmp/docker.sock \
|
2015-08-14 15:18:41 +00:00
|
|
|
$(NAME):dev /bin/registrator $(DEV_RUN_OPTS)
|
2014-07-02 02:58:28 +00:00
|
|
|
|
|
|
|
build:
|
2015-02-18 17:53:03 +00:00
|
|
|
mkdir -p build
|
|
|
|
docker build -t $(NAME):$(VERSION) .
|
|
|
|
docker save $(NAME):$(VERSION) | gzip -9 > build/$(NAME)_$(VERSION).tgz
|
|
|
|
|
2015-02-18 18:23:50 +00:00
|
|
|
release:
|
2015-08-07 23:45:23 +00:00
|
|
|
rm -rf release && mkdir release
|
|
|
|
go get github.com/progrium/gh-release/...
|
|
|
|
cp build/* release
|
|
|
|
gh-release create gliderlabs/$(NAME) $(VERSION) \
|
|
|
|
$(shell git rev-parse --abbrev-ref HEAD) $(VERSION)
|
2015-08-07 23:20:25 +00:00
|
|
|
glu hubtag gliderlabs/$(NAME) $(VERSION)
|
2014-07-02 18:21:05 +00:00
|
|
|
|
2015-08-06 22:51:27 +00:00
|
|
|
docs:
|
2015-08-12 15:07:37 +00:00
|
|
|
boot2docker ssh "sync; sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'" || true
|
2015-08-06 22:51:27 +00:00
|
|
|
docker run --rm -it -p 8000:8000 -v $(PWD):/work gliderlabs/pagebuilder mkdocs serve
|
|
|
|
|
2015-02-18 17:53:03 +00:00
|
|
|
circleci:
|
2015-08-07 23:22:27 +00:00
|
|
|
rm -f ~/.gitconfig
|
2015-08-07 22:53:40 +00:00
|
|
|
go get -u github.com/gliderlabs/glu
|
|
|
|
glu circleci
|
2014-07-03 16:58:46 +00:00
|
|
|
|
2015-08-06 22:51:27 +00:00
|
|
|
.PHONY: build release docs
|