2019-04-05 22:44:06 +00:00
|
|
|
.DEFAULT_GOAL := all
|
|
|
|
|
|
|
|
d ?= api
|
|
|
|
c ?= $(shell date +%F | tr "-" ".")
|
|
|
|
r ?= $(shell git rev-list --count HEAD)
|
|
|
|
name = miniloom/$(d):$(c).$(r)
|
|
|
|
|
2019-04-06 21:35:44 +00:00
|
|
|
master_key := $(shell cat config/master.key)
|
|
|
|
|
2019-04-06 20:41:44 +00:00
|
|
|
doc:
|
|
|
|
./bin/yardoc --output-dir=./docs/ \
|
|
|
|
app/controllers/*.rb \
|
|
|
|
app/models/*.rb
|
|
|
|
|
2019-04-05 22:44:06 +00:00
|
|
|
clean:
|
|
|
|
rm -f log/*.log
|
|
|
|
rm -rf tmp/cache/assets
|
|
|
|
|
|
|
|
build:
|
2019-04-06 21:35:44 +00:00
|
|
|
docker build --build-arg MASTER_KEY=$(master_key) -t $(name) .
|
2019-04-05 22:44:06 +00:00
|
|
|
|
|
|
|
tag:
|
|
|
|
git tag $(c).$(r)
|
|
|
|
docker tag $(name) miniloom/$(d):latest
|
|
|
|
docker tag $(name) registry.forja.lainventoria.com.ar/$(name)
|
|
|
|
docker tag $(name) registry.forja.lainventoria.com.ar/miniloom/$(d):latest
|
|
|
|
|
|
|
|
push:
|
|
|
|
docker push registry.forja.lainventoria.com.ar/$(name)
|
|
|
|
docker push registry.forja.lainventoria.com.ar/miniloom/$(d):latest
|
|
|
|
|
2019-04-06 20:41:44 +00:00
|
|
|
all: clean doc build tag push
|