From 0267a392c296c5e6a24e6d10166c90741959bb18 Mon Sep 17 00:00:00 2001 From: Thierry de Pauw Date: Wed, 20 Apr 2022 13:34:38 +0200 Subject: [PATCH] Add Makefile for building locally and tagging (#5) --- Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..333b29f --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +.DEFAULT_GOAL := help +.PHONY: tag build + +version=$(shell cat .version) + +tag: ## Tag git repo + git tag -a ${version} -m "Bump ${version}" + git push origin main --follow-tags + +build: ## Build Docker image + echo "[${version}]" + docker build --tag ghrc.io/thinkinglabs/terraform:${version} . + +help: + @grep -h -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'