changedetection/Makefile

36 lines
950 B
Makefile
Raw Permalink Normal View History

2019-10-23 15:20:00 +00:00
PROJECT = changedetection
VERSION = $(shell git rev-parse --short HEAD)
2019-10-23 15:49:03 +00:00
ECR_REPO = mail.caliban.io:5000
#APP_IMAGE = 482681734622.dkr.ecr.eu-west-1.amazonaws.com/$(PROJECT):$(VERSION)
APP_IMAGE = $(ECR_REPO)/$(PROJECT):$(VERSION)
2019-10-23 15:20:00 +00:00
NO_CACHE = false
2019-10-23 15:49:03 +00:00
2019-10-23 15:20:00 +00:00
#build docker image
build:
# docker build . -t $(APP_IMAGE) --build-arg VERSION=$(VERSION) --no-cache=$(NO_CACHE)
# tar -C ./ -czvf ./archive.tar.gz 'package.json' 'ncas/' 'helpers/' -X *.js
docker build . -t $(APP_IMAGE) --build-arg VERSION=$(VERSION) --no-cache=$(NO_CACHE)
.PHONY: build
#push docker image to registry
push: build
docker push $(APP_IMAGE)
.PHONY: push
#push docker image to registry
run: build
docker run $(APP_IMAGE)
.PHONY: run
ver:
@echo '$(VERSION)'
#echo $ERSION
.PHONY: ver
tar:
# docker build . -t $(APP_IMAGE) --build-arg VERSION=$(VERSION) --no-cache=$(NO_CACHE)
tar -C ./ -czvf ./archive.tar.gz 'package.json' 'ncas/' 'helpers/' -X *.js
.PHONY: build