Skip to content

Commit

Permalink
Fix gh-release make task on MacOS
Browse files Browse the repository at this point in the history
Resolves #103

Signed-off-by: Marco Franssen <[email protected]>
  • Loading branch information
marcofranssen committed Jan 26, 2022
1 parent 3c40057 commit 58b193c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ __check_defined = \
$(if $(value $1),, \
$(error Undefined $1$(if $2, ($2))))

UNAME_S := $(shell uname -s)

ifeq ($(UNAME_S), Darwin)
SED ?= gsed
else
SED ?= sed
endif

.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-25s\033[0m %s\n", $$1, $$2}'
Expand Down Expand Up @@ -109,7 +117,7 @@ gh-release: ## Creates a new release by creating a new tag and pushing it
@:$(call check_defined, DESCRIPTION)
@git stash -u
@echo Bumping $(OLD_VERSION) to $(NEW_VERSION)
@sed -i 's/$(OLD_VERSION)/$(NEW_VERSION)/g' .github/workflows/*.yaml *.yaml *.md
@$(SED) -i 's/$(OLD_VERSION)/$(NEW_VERSION)/g' .github/workflows/*.yaml *.yaml *.md
@git add .
@git commit -s -m "Bump $(OLD_VERSION) to $(NEW_VERSION) for release"
@git tag -sam "$(DESCRIPTION)" $(NEW_VERSION)
Expand Down

0 comments on commit 58b193c

Please sign in to comment.