docker-keepalived/Makefile

24 lines
649 B
Makefile
Raw Normal View History

2015-06-09 18:41:43 +00:00
NAME = osixia/keepalived
VERSION = 0.2.3
2015-06-09 18:41:43 +00:00
.PHONY: all build build-nocache test tag_latest release
2015-06-09 18:41:43 +00:00
all: build
build:
docker build -t $(NAME):$(VERSION) --rm image
build-nocache:
docker build -t $(NAME):$(VERSION) --no-cache --rm image
2015-06-09 18:41:43 +00:00
test:
env NAME=$(NAME) VERSION=$(VERSION) bats test/test.bats
tag_latest:
docker tag $(NAME):$(VERSION) $(NAME):latest
2015-06-09 18:41:43 +00:00
release: build test tag_latest
@if ! docker images $(NAME) | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME) version $(VERSION) is not yet built. Please run 'make build'"; false; fi
docker push $(NAME)
@echo "*** Don't forget to run 'twgit release/hotfix finish' :)"