diff --git a/Makefile b/Makefile index 0b81165..a9a1711 100755 --- a/Makefile +++ b/Makefile @@ -12,6 +12,9 @@ OS := $(shell uname -s | tr '[:upper:]' '[:lower:]') MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MAKEFILE_PATH)))) PUMAD_HOME := $(shell dirname $(MAKEFILE_PATH)) +VERSION := $(shell bundle exec ruby -I lib -r puma-daemon.rb -e 'puts Puma::Daemon::VERSION') +TAG := $(shell echo "v$(VERSION)") +BRANCH := $(shell git branch --show) help: ## Prints help message auto-generated from the comments. @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' @@ -57,3 +60,7 @@ generate-pdf: ## Regenerates README,pdf from README.adoc clean: ## Clean-up @rm -rf Gemfile Gemfile.lock coverage +tag: ## Tag with the latest .version + @/usr/bin/env bash -c "git tag | grep -q '$(TAG)' && { echo 'Tag $(TAG) is already assigned.'; exit 1; } || true" + @/usr/bin/env bash -c "if [[ $(BRANCH) != master ]]; then echo 'Must be on the main branch'; else git tag -f '$(TAG)'; git push --tags --force; fi" + diff --git a/README.adoc b/README.adoc index 7c9117f..b459214 100644 --- a/README.adoc +++ b/README.adoc @@ -28,7 +28,7 @@ |image:https://codecov.io/gh/kigster/puma-daemon/branch/master/graph/badge.svg?token=asxarMSGbz[link=https://codecov.io/gh/kigster/puma-daemon,height="30"] |Coverage Areas -|image:https://codecov.io/gh/kigster/puma-daemon/branch/master/graphs/sunburst.svg?token=asxarMSGbz[sunbirst,width="30%",link=https://codecov.io/gh/kigster/puma-daemon,float=left] image:https://codecov.io/gh/kigster/puma-daemon/branch/master/graphs/icicle.svg?token=asxarMSGbz[coverage-graph,,height="30",link=https://codecov.io/gh/kigster/puma-daemon,float=right] +|image:https://codecov.io/gh/kigster/puma-daemon/branch/master/graphs/icicle.svg?token=asxarMSGbz[coverage-graph,,height="30",link=https://codecov.io/gh/kigster/puma-daemon,float=left] |=== diff --git a/README.pdf b/README.pdf index 1eef456..3c6c18a 100644 Binary files a/README.pdf and b/README.pdf differ