Skip to content

Commit

Permalink
Tweak makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
jonator committed Jun 8, 2020
1 parent e068f95 commit 94deeea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help build run push deploy
.PHONY: help mix_test build run push deploy

APP_NAME := $(shell grep 'app:' mix.exs | sed -e 's/\[//g' -e 's/ //g' -e 's/app://' -e 's/[:,]//g')
APP_VSN := v$(shell grep 'version:' mix.exs | cut -d '"' -f2)
Expand All @@ -12,7 +12,7 @@ help:
@echo "$(APP_NAME):$(APP_VSN)-$(BUILD)"
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

test:
mix_test:
mix test

build:
Expand All @@ -31,5 +31,5 @@ run:
push:
docker push jator/$(APP_NAME):release-$(APP_VSN)

deploy: help test build push
deploy: help mix_test build push
ssh [email protected] 'sed -i "s|jator/kritikos:release-.*|jator/kritikos:release-$(APP_VSN)|g" ./docker-compose.yaml && docker-compose up -d'

0 comments on commit 94deeea

Please sign in to comment.