Makefile 551 B

123456789101112131415161718192021
  1. NAME = osixia/openldap
  2. VERSION = 0.7.4
  3. .PHONY: all build test tag_latest release
  4. all: build
  5. build:
  6. docker.io build -t $(NAME):$(VERSION) --rm .
  7. test:
  8. env NAME=$(NAME) VERSION=$(VERSION) ./test.sh
  9. tag_latest:
  10. docker.io tag $(NAME):$(VERSION) $(NAME):latest
  11. release: build test tag_latest
  12. @if ! docker.io images $(NAME) | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME) version $(VERSION) is not yet built. Please run 'make build'"; false; fi
  13. docker.io push $(NAME)
  14. @echo "*** Don't forget to run 'twgit release finish' :)"