Skip to content

Commit

Permalink
Adding makefile tag target
Browse files Browse the repository at this point in the history
  • Loading branch information
kigster committed Jun 30, 2024
1 parent f9c70ab commit 15cc70e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
Expand Down Expand Up @@ -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"

2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]

|===

Expand Down
Binary file modified README.pdf
Binary file not shown.

0 comments on commit 15cc70e

Please sign in to comment.