diff --git a/.gitignore b/.gitignore index dbe95de..e837380 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,5 @@ npm-debug.log /priv/static/ rel/ metadata.json + +deploy.sh diff --git a/Makefile b/Makefile index 2db92dc..ac6fd96 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ start: up install-deps ## Start openpod application docker-compose exec open-pod iex -S mix phx.server .PHONY: install-deps -install-deps: container/open-pod ## Install worms dependencies +install-deps: container/open-pod ## Install open-pod dependencies docker-compose exec open-pod mix deps.get .PHONY: stop @@ -21,13 +21,19 @@ help: container/%: @docker ps -q --no-trunc --filter status=running | grep $$(docker-compose ps -q $*) >/dev/null 2>&1 || docker-compose up -d $* -.PHONY: build_and_publish -build_and_publish: check-version +.PHONY: build +build: check-version @docker build -t openpod/open-pod:latest . @docker push openpod/open-pod:latest @docker build -t openpod/open-pod:${VERSION} . + +.PHONY: publish +publish: check-version @docker push openpod/open-pod:${VERSION} +.PHONY: build-publish +build-publish: check-version build publish + check-version: ifndef VERSION $(error VERSION is undefined)