Add docker-release
Add VERSION variable for use with docker-release. Creates a new docker image automatically and a commit to go with it.
This commit is contained in:
1
Makefile
1
Makefile
@@ -1,5 +1,6 @@
|
|||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
|
|
||||||
|
VERSION ?= $(shell cat VERSION)
|
||||||
IMAGE ?= $(shell cat IMAGE):$(shell cat VERSION)
|
IMAGE ?= $(shell cat IMAGE):$(shell cat VERSION)
|
||||||
IMAGE_LATEST ?= $(shell cat IMAGE):latest
|
IMAGE_LATEST ?= $(shell cat IMAGE):latest
|
||||||
PWD ?= $(shell pwd)
|
PWD ?= $(shell pwd)
|
||||||
|
|||||||
@@ -20,3 +20,10 @@ build:
|
|||||||
push:
|
push:
|
||||||
docker buildx build --platform linux/amd64 --push . -t $(IMAGE)
|
docker buildx build --platform linux/amd64 --push . -t $(IMAGE)
|
||||||
@docker buildx build --platform linux/amd64 --push . -t $(IMAGE_LATEST)
|
@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
|
||||||
|
|||||||
Reference in New Issue
Block a user