Skip to content

Commit

Permalink
build: simply the release version composing step (#11344)
Browse files Browse the repository at this point in the history
close #11345
  • Loading branch information
wuhuizuo authored Jul 11, 2024
1 parent c8644a0 commit 482fd8e
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,7 @@ MAKE_FILES = $(shell find . \( -name 'Makefile' -o -name '*.mk' \) -print)

RELEASE_VERSION =
ifeq ($(RELEASE_VERSION),)
RELEASE_VERSION := v8.2.0-master
release_version_regex := ^v[0-9]\..*$$
release_branch_regex := "^release-[0-9]\.[0-9].*$$|^HEAD$$|^.*/*tags/v[0-9]\.[0-9]\..*$$"
ifneq ($(shell git rev-parse --abbrev-ref HEAD | grep -E $(release_branch_regex)),)
# If we are in release branch, try to use tag version.
ifneq ($(shell git describe --tags --dirty | grep -E $(release_version_regex)),)
RELEASE_VERSION := $(shell git describe --tags --dirty)
endif
else ifneq ($(shell git status --porcelain),)
# Add -dirty if the working tree is dirty for non release branch.
RELEASE_VERSION := $(RELEASE_VERSION)-dirty
endif
RELEASE_VERSION := $(shell git describe --tags --dirty)
endif

BUILDTS := $(shell date -u '+%Y-%m-%d %H:%M:%S')
Expand Down

0 comments on commit 482fd8e

Please sign in to comment.