mirror of
https://github.com/rclone/rclone.git
synced 2024-11-28 11:25:18 +01:00
build: when building a tag release don't suffix the version
This commit is contained in:
parent
6cf684f2a1
commit
6396872d75
5
Makefile
5
Makefile
@ -1,5 +1,9 @@
|
|||||||
SHELL = bash
|
SHELL = bash
|
||||||
BRANCH := $(or $(APPVEYOR_REPO_BRANCH),$(TRAVIS_BRANCH),$(shell git rev-parse --abbrev-ref HEAD))
|
BRANCH := $(or $(APPVEYOR_REPO_BRANCH),$(TRAVIS_BRANCH),$(shell git rev-parse --abbrev-ref HEAD))
|
||||||
|
LAST_TAG := $(shell git describe --tags --abbrev=0)
|
||||||
|
ifeq ($(BRANCH),$(LAST_TAG))
|
||||||
|
BRANCH := master
|
||||||
|
endif
|
||||||
TAG_BRANCH := -$(BRANCH)
|
TAG_BRANCH := -$(BRANCH)
|
||||||
BRANCH_PATH := branch/
|
BRANCH_PATH := branch/
|
||||||
ifeq ($(subst HEAD,,$(subst master,,$(BRANCH))),)
|
ifeq ($(subst HEAD,,$(subst master,,$(BRANCH))),)
|
||||||
@ -7,7 +11,6 @@ ifeq ($(subst HEAD,,$(subst master,,$(BRANCH))),)
|
|||||||
BRANCH_PATH :=
|
BRANCH_PATH :=
|
||||||
endif
|
endif
|
||||||
TAG := $(shell echo $$(git describe --abbrev=8 --tags | sed 's/-\([0-9]\)-/-00\1-/; s/-\([0-9][0-9]\)-/-0\1-/'))$(TAG_BRANCH)
|
TAG := $(shell echo $$(git describe --abbrev=8 --tags | sed 's/-\([0-9]\)-/-00\1-/; s/-\([0-9][0-9]\)-/-0\1-/'))$(TAG_BRANCH)
|
||||||
LAST_TAG := $(shell git describe --tags --abbrev=0)
|
|
||||||
NEW_TAG := $(shell echo $(LAST_TAG) | perl -lpe 's/v//; $$_ += 0.01; $$_ = sprintf("v%.2f", $$_)')
|
NEW_TAG := $(shell echo $(LAST_TAG) | perl -lpe 's/v//; $$_ += 0.01; $$_ = sprintf("v%.2f", $$_)')
|
||||||
ifneq ($(TAG),$(LAST_TAG))
|
ifneq ($(TAG),$(LAST_TAG))
|
||||||
TAG := $(TAG)-beta
|
TAG := $(TAG)-beta
|
||||||
|
Loading…
Reference in New Issue
Block a user