26 lines
587 B
Makefile
26 lines
587 B
Makefile
|
.DEFAULT_GOAL := all
|
||
|
|
||
|
d ?= api
|
||
|
c ?= $(shell date +%F | tr "-" ".")
|
||
|
r ?= $(shell git rev-list --count HEAD)
|
||
|
name = miniloom/$(d):$(c).$(r)
|
||
|
|
||
|
clean:
|
||
|
rm -f log/*.log
|
||
|
rm -rf tmp/cache/assets
|
||
|
|
||
|
build:
|
||
|
docker build -t $(name) .
|
||
|
|
||
|
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
|
||
|
|
||
|
all: clean build tag push
|