From 3e472ebe86a22d8ba2bbaa01221f50979582036f Mon Sep 17 00:00:00 2001 From: ducoterra Date: Mon, 1 Nov 2021 20:52:59 -0400 Subject: [PATCH] Add docker-release Add VERSION variable for use with docker-release. Creates a new docker image automatically and a commit to go with it. --- Makefile | 1 + make/docker.makefile | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 61a7dbb..d41ecfa 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ SHELL := /bin/bash +VERSION ?= $(shell cat VERSION) IMAGE ?= $(shell cat IMAGE):$(shell cat VERSION) IMAGE_LATEST ?= $(shell cat IMAGE):latest PWD ?= $(shell pwd) diff --git a/make/docker.makefile b/make/docker.makefile index fc07142..12a92ff 100644 --- a/make/docker.makefile +++ b/make/docker.makefile @@ -20,3 +20,10 @@ build: push: docker buildx build --platform linux/amd64 --push . -t $(IMAGE) @docker buildx build --platform linux/amd64 --push . -t $(IMAGE_LATEST) + +.PHONY: docker-release +docker-release: + @git add . + @git commit -m "Automated release for version $(VERSION)" + @git tag $(VERSION) + @make push