Makefile 706 B

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