refactor: change target name on makefile

This commit is contained in:
danilo silva 2020-12-07 11:24:26 +00:00
parent 4470cd77a7
commit ba34c0234b
2 changed files with 11 additions and 3 deletions

2
.gitignore vendored
View file

@ -34,3 +34,5 @@ npm-debug.log
/priv/static/ /priv/static/
rel/ rel/
metadata.json metadata.json
deploy.sh

View file

@ -7,7 +7,7 @@ start: up install-deps ## Start openpod application
docker-compose exec open-pod iex -S mix phx.server docker-compose exec open-pod iex -S mix phx.server
.PHONY: install-deps .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 docker-compose exec open-pod mix deps.get
.PHONY: stop .PHONY: stop
@ -21,13 +21,19 @@ help:
container/%: container/%:
@docker ps -q --no-trunc --filter status=running | grep $$(docker-compose ps -q $*) >/dev/null 2>&1 || docker-compose up -d $* @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 .PHONY: build
build_and_publish: check-version build: check-version
@docker build -t openpod/open-pod:latest . @docker build -t openpod/open-pod:latest .
@docker push openpod/open-pod:latest @docker push openpod/open-pod:latest
@docker build -t openpod/open-pod:${VERSION} . @docker build -t openpod/open-pod:${VERSION} .
.PHONY: publish
publish: check-version
@docker push openpod/open-pod:${VERSION} @docker push openpod/open-pod:${VERSION}
.PHONY: build-publish
build-publish: check-version build publish
check-version: check-version:
ifndef VERSION ifndef VERSION
$(error VERSION is undefined) $(error VERSION is undefined)