Makefile 650 B

1234567891011121314151617181920212223
  1. NAME = osixia/openldap
  2. VERSION = 1.0.9
  3. .PHONY: all build build-nocache test tag_latest release
  4. all: build
  5. build:
  6. docker build -t $(NAME):$(VERSION) --rm image
  7. build-nocache:
  8. docker build -t $(NAME):$(VERSION) --no-cache --rm image
  9. test:
  10. env NAME=$(NAME) VERSION=$(VERSION) bats test/test.bats
  11. tag_latest:
  12. docker tag -f $(NAME):$(VERSION) $(NAME):latest
  13. release: build test tag_latest
  14. @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
  15. docker push $(NAME)
  16. @echo "*** Don't forget to run 'twgit release/hotfix finish' :)"