Removed v prefix from git tag recipes
This commit is contained in:
parent
7d56ef2f33
commit
e640bf8bed
1 changed files with 9 additions and 9 deletions
18
Makefile
18
Makefile
|
|
@ -1,9 +1,9 @@
|
||||||
.PHONY: build frontend-build dev clean test patch minor major
|
.PHONY: build frontend-build dev clean test patch minor major
|
||||||
|
|
||||||
LAST_TAG := $(shell git tag --sort=-v:refname | head -1)
|
LAST_TAG := $(shell git tag --sort=-v:refname | head -1)
|
||||||
MAJOR := $(shell echo $(LAST_TAG) | sed 's/^v//' | cut -d. -f1)
|
MAJOR := $(shell echo $(LAST_TAG) | cut -d. -f1)
|
||||||
MINOR := $(shell echo $(LAST_TAG) | sed 's/^v//' | cut -d. -f2)
|
MINOR := $(shell echo $(LAST_TAG) | cut -d. -f2)
|
||||||
PATCH := $(shell echo $(LAST_TAG) | sed 's/^v//' | cut -d. -f3)
|
PATCH := $(shell echo $(LAST_TAG) | cut -d. -f3)
|
||||||
|
|
||||||
build: frontend-build
|
build: frontend-build
|
||||||
CGO_ENABLED=0 go build -ldflags "-X main.buildID=$$(git rev-parse --short HEAD)" -o turnpike .
|
CGO_ENABLED=0 go build -ldflags "-X main.buildID=$$(git rev-parse --short HEAD)" -o turnpike .
|
||||||
|
|
@ -25,13 +25,13 @@ clean:
|
||||||
rm -rf frontend/dist
|
rm -rf frontend/dist
|
||||||
|
|
||||||
patch:
|
patch:
|
||||||
git tag v$(MAJOR).$(MINOR).$(shell echo $$(($(PATCH)+1)))
|
git tag $(MAJOR).$(MINOR).$(shell echo $$(($(PATCH)+1)))
|
||||||
@echo "Tagged v$(MAJOR).$(MINOR).$(shell echo $$(($(PATCH)+1)))"
|
@echo "Tagged $(MAJOR).$(MINOR).$(shell echo $$(($(PATCH)+1)))"
|
||||||
|
|
||||||
minor:
|
minor:
|
||||||
git tag v$(MAJOR).$(shell echo $$(($(MINOR)+1))).0
|
git tag $(MAJOR).$(shell echo $$(($(MINOR)+1))).0
|
||||||
@echo "Tagged v$(MAJOR).$(shell echo $$(($(MINOR)+1))).0"
|
@echo "Tagged $(MAJOR).$(shell echo $$(($(MINOR)+1))).0"
|
||||||
|
|
||||||
major:
|
major:
|
||||||
git tag v$(shell echo $$(($(MAJOR)+1))).0.0
|
git tag $(shell echo $$(($(MAJOR)+1))).0.0
|
||||||
@echo "Tagged v$(shell echo $$(($(MAJOR)+1))).0.0"
|
@echo "Tagged $(shell echo $$(($(MAJOR)+1))).0.0"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue