Makefile 603 B

12345678910111213141516171819202122232425262728
  1. NAME = osixia/openldap
  2. VERSION = 1.2.0
  3. .PHONY: build build-nocache test tag-latest push push-latest release git-tag-version
  4. build:
  5. docker build -t $(NAME):$(VERSION) --rm image
  6. build-nocache:
  7. docker build -t $(NAME):$(VERSION) --no-cache --rm image
  8. test:
  9. env NAME=$(NAME) VERSION=$(VERSION) bats test/test.bats
  10. tag-latest:
  11. docker tag $(NAME):$(VERSION) $(NAME):latest
  12. push:
  13. docker push $(NAME):$(VERSION)
  14. push-latest:
  15. docker push $(NAME):latest
  16. release: build test tag-latest push push-latest
  17. git-tag-version: release
  18. git tag -a v$(VERSION) -m "v$(VERSION)"
  19. git push origin v$(VERSION)