mirror of
https://github.com/Threnklyn/jira.git
synced 2026-06-04 03:58:29 +02:00
fix for versions with 'v' prefix
This commit is contained in:
@@ -33,8 +33,8 @@ DIST=$(CWD)$(SEP)dist
|
|||||||
|
|
||||||
GOBIN ?= $(CWD)
|
GOBIN ?= $(CWD)
|
||||||
|
|
||||||
CURVER ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags || grep ^\#\# CHANGELOG.md | awk '{print $$2; exit}')
|
CURVER ?= $(patsubst v%,%,$(shell [ -d .git ] && git describe --abbrev=0 --tags || grep ^\#\# CHANGELOG.md | awk '{print $$2; exit}'))
|
||||||
LDFLAGS:=-X jira.VERSION=$(patsubst v%,%,$(CURVER)) -w
|
LDFLAGS:=-X jira.VERSION=$(CURVER) -w
|
||||||
|
|
||||||
# use make DEBUG=1 and you can get a debuggable golang binary
|
# use make DEBUG=1 and you can get a debuggable golang binary
|
||||||
# see https://github.com/mailgun/godebug
|
# see https://github.com/mailgun/godebug
|
||||||
@@ -76,7 +76,7 @@ NEWVER ?= $(shell echo $(CURVER) | awk -F. '{print $$1"."$$2"."$$3+1}')
|
|||||||
TODAY := $(shell date +%Y-%m-%d)
|
TODAY := $(shell date +%Y-%m-%d)
|
||||||
|
|
||||||
changes:
|
changes:
|
||||||
@git log --pretty=format:"* %s [%cn] [%h]" --no-merges ^$(CURVER) HEAD main/*.go *.go | grep -vE 'gofmt|go fmt'
|
@git log --pretty=format:"* %s [%cn] [%h]" --no-merges ^v$(CURVER) HEAD main/*.go *.go | grep -vE 'gofmt|go fmt'
|
||||||
|
|
||||||
update-changelog:
|
update-changelog:
|
||||||
@echo "# Changelog" > CHANGELOG.md.new; \
|
@echo "# Changelog" > CHANGELOG.md.new; \
|
||||||
@@ -92,7 +92,7 @@ update-changelog:
|
|||||||
git tag v$(NEWVER)
|
git tag v$(NEWVER)
|
||||||
|
|
||||||
version:
|
version:
|
||||||
@echo $(patsubst v%,%,$(CURVER))
|
@echo $(CURVER)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf pkg dist bin src ./$(NAME)
|
rm -rf pkg dist bin src ./$(NAME)
|
||||||
|
|||||||
Reference in New Issue
Block a user