Makefile 652 B

1234567891011121314151617181920212223242526
  1. NAME = osixia/light-baseimage
  2. VERSION = alpine-0.1.9
  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. push:
  13. docker push $(NAME):$(VERSION)
  14. release: build test tag-latest push push-latest
  15. git-tag-version:
  16. git tag -a alpine-v$(VERSION:alpine-%=%) -m "v$(VERSION:alpine-%=%)"
  17. git push origin alpine-v$(VERSION:alpine-%=%)