Skip to content

Commit

Permalink
chore: Modify the way the binary version is set when compiling (#388)
Browse files Browse the repository at this point in the history
* chore: modify how binary version is defined

Signed-off-by: zemyblue <zemyblue@gmail.com>

* chore: update changelog

Signed-off-by: zemyblue <zemyblue@gmail.com>

---------

Signed-off-by: zemyblue <zemyblue@gmail.com>
(cherry picked from commit 7d99e17)

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
zemyblue authored and mergify[bot] committed Jun 17, 2024
1 parent 0d1b050 commit f91f1c0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,16 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Build, CI
* (build) [\#340](https://github.com/Finschia/finschia/pull/340) Set Finschia/ostracon version
<<<<<<< HEAD
* (ci) [\#363](https://github.com/Finschia/finschia/pull/363) Replace deprecated linters with new ones (backport #361)
* (ci) [\#364](https://github.com/Finschia/finschia/pull/364) Add RELEASE_NOTE.md to .gitignore (backport #362)
* (swagger) [\#372](https://github.com/Finschia/finschia/pull/372) Add fswap and fbridge swagger settings in swagger config (backport #371)
=======
* (ci) [\#361](https://github.com/Finschia/finschia/pull/361) Replace deprecated linters with new ones
* (ci) [\#362](https://github.com/Finschia/finschia/pull/362) Add RELEASE_NOTE.md to .gitignore
* (swagger) [\#371](https://github.com/Finschia/finschia/pull/371) Add fswap and fbridge swagger settings in swagger config
* (build) [\#388](https://github.com/Finschia/finschia/pull/388) Modify the way the binary version is set when compiling
>>>>>>> 7d99e17 (chore: Modify the way the binary version is set when compiling (#388))

## [v3.0.0] - 2024-03-04
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

COMMIT ?= $(shell git log -1 --format='%H')

# ascribe tag only if on a release/ branch, otherwise pick branch name and concatenate commit hash
# Specify a tag only if it has a specific tag, otherwise choose a branch name and concatenate the commit hash.
ifeq (,$(VERSION))
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//')
ifeq (, $(findstring release/,$(BRANCH)))
SHORT_COMMIT := $(shell git log -1 --format='%h')
ifneq (, $(findstring $(SHORT_COMMIT),$(VERSION)))
VERSION = $(subst /,_,$(BRANCH))-$(COMMIT)
endif
endif
Expand Down

0 comments on commit f91f1c0

Please sign in to comment.