1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Change to utilise lightweight tags for make dist

This commit is contained in:
Bernhard Reiter 2022-05-11 12:31:28 +02:00
parent bb6b8d15d4
commit ed9b90ee56
No known key found for this signature in database
GPG key ID: 2B7BA3BF9BC3A554
2 changed files with 3 additions and 3 deletions

View file

@ -11,8 +11,6 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v3 uses: actions/setup-go@v3

View file

@ -41,7 +41,9 @@ tag_checked_out:
# into a semver version. For this we increase the PATCH number, so that # into a semver version. For this we increase the PATCH number, so that
# any commit after a tag is considered newer than the semver from the tag # any commit after a tag is considered newer than the semver from the tag
# without an optional 'v' # without an optional 'v'
GITDESC := $(shell git describe) # Note we need `--tags` because github release only creates lightweight tags
# (see feature request https://github.com/github/feedback/discussions/4924)
GITDESC := $(shell git describe --tags)
GITDESCPATCH := $(shell echo '$(GITDESC)' | sed -E 's/v?[0-9]+\.[0-9]+\.([0-9]+)[-+]?.*/\1/') GITDESCPATCH := $(shell echo '$(GITDESC)' | sed -E 's/v?[0-9]+\.[0-9]+\.([0-9]+)[-+]?.*/\1/')
SEMVERPATCH := $(shell echo $$(( $(GITDESCPATCH) + 1 ))) SEMVERPATCH := $(shell echo $$(( $(GITDESCPATCH) + 1 )))
# Hint: The regexp in the next line only matches if there is a hyphen (`-`) # Hint: The regexp in the next line only matches if there is a hyphen (`-`)