Skip to content

Commit

Permalink
Get stable tag from the version json
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus committed Dec 18, 2020
1 parent c5e9653 commit 60a536a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
-include .env
export $(shell sed 's/=.*//' .env)

.ONESHELL:

api:
docker-compose up -d elastic mq db
cd cmd/api && go run .
Expand Down Expand Up @@ -91,7 +93,7 @@ test:

lint:
golangci-lint run

docs:
# wget https://github.com/swaggo/swag/releases/download/v1.6.6/swag_1.6.6_Linux_x86_64.tar.gz
# tar -zxvf swag_1.6.6_Linux_x86_64.tar.gz
Expand All @@ -102,22 +104,23 @@ images:
docker-compose build

stable-images:
TAG=$$STABLE_TAG docker-compose build
TAG=$$(cat version.json | grep version | awk -F\" '{ print $$4 }' | cut -d '.' -f1-2) && docker-compose build

stable-pull:
TAG=$$STABLE_TAG docker-compose pull
TAG=$$(cat version.json | grep version | awk -F\" '{ print $$4 }' | cut -d '.' -f1-2) && docker-compose pull

stable:
TAG=$$STABLE_TAG docker-compose up -d
TAG=$$(cat version.json | grep version | awk -F\" '{ print $$4 }' | cut -d '.' -f1-2) && docker-compose up -d

latest:
docker-compose up -d

upgrade:
$(MAKE) clearmq
docker-compose down
STABLE_TAG=$$(cat version.json | grep version | awk -F\" '{ print $$4 }' | cut -d '.' -f1-2)
TAG=$$STABLE_TAG $(MAKE) es-reset
docker-compose up -d db mq
TAG=$$STABLE_TAG docker-compose up -d db mq

restart:
docker-compose restart api metrics indexer compiler
Expand Down

0 comments on commit 60a536a

Please sign in to comment.