registrator/Makefile

29 lines
682 B
Makefile
Raw Normal View History

NAME=registrator
VERSION=$(shell cat VERSION)
dev:
docker build -f Dockerfile.dev -t $(NAME):dev .
docker run --rm \
-v /var/run/docker.sock:/tmp/docker.sock \
$(NAME):dev /bin/registrator consul:
2014-07-02 02:58:28 +00:00
build:
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:
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)
2014-07-02 18:21:05 +00:00
circleci:
rm ~/.gitconfig
ifneq ($(CIRCLE_BRANCH), release)
echo build-$$CIRCLE_BUILD_NUM > VERSION
endif
2014-07-03 16:58:46 +00:00
.PHONY: build release