Skip to content
This repository has been archived by the owner on Jul 5, 2022. It is now read-only.

Commit

Permalink
always pick the latest sem ver with same hash (#33)
Browse files Browse the repository at this point in the history
Co-authored-by: nyanpassu <[email protected]>
  • Loading branch information
雾雨 and nyanpassu authored Aug 11, 2021
1 parent 08ffd6e commit b1e1f5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- name: Set up environment variables
run: |
echo "VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV
echo "VERSION=$(git tag --contains $(git rev-list --tags --max-count=1) | sed '/-/!{s/$/_/}' | sort -V -r | sed 's/_$//' | head -1)" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v2
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ REPO_PATH := github.com/projecteru2/barrel
REVISION := $(shell git rev-parse HEAD || unknown)
BUILTAT := $(shell date +%Y-%m-%dT%H:%M:%S)
BUILD_PATH := target
VERSION := $(shell git describe --tags $(shell git rev-list --tags --max-count=1))
VERSION := $(shell git tag --contains $(shell git rev-list --tags --max-count=1) | sed '/-/!{s/$/_/}' | sort -V -r | sed 's/_$//' | head -1)
GO_LDFLAGS ?= -s -X $(REPO_PATH)/versioninfo.REVISION=$(REVISION) \
-X $(REPO_PATH)/versioninfo.BUILTAT=$(BUILTAT) \
-X $(REPO_PATH)/versioninfo.VERSION=$(VERSION)
Expand Down

0 comments on commit b1e1f5c

Please sign in to comment.