From 93a9d3579fd30c6e47631289691a6e49d10fc7b2 Mon Sep 17 00:00:00 2001 From: Vlatko Kosturjak Date: Tue, 11 Feb 2020 21:01:56 +0100 Subject: [PATCH] add makefile --- Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..457ace3 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +REPO=dok3r +NAME=ulx3s-saxonsoc +IMAGE=$(REPO)/$(NAME) +OSTYPE=$(shell uname -s | tr '[A-Z]' '[a-z]') +MACHINE=$(shell uname -m) +ARCH=$(OSTYPE)-$(MACHINE) +VERSION=$(shell date '+%Y.%m.%d') + +ver: + echo $(IMAGE) version $(VERSION) + +build: + docker build -t $(IMAGE):v$(VERSION) . + +push: + docker push $(IMAGE):v$(VERSION) + +pull: + docker pull $(IMAGE):v$(VERSION) + +latest: + docker tag $(IMAGE):v$(VERSION) $(IMAGE):latest + docker push $(IMAGE):latest + +gittag: + git tag v$(VERSION) + git push --tags origin master + +clean: + rm -rf dist work + +rel: + ghr v$(VERSION) dist/ + +draft: + ghr -draft v$(VERSION) dist/