Makefile: fix packer version by using git tag
For releases this does not change anything, as the version in the spec file is the same as the git tag. For intermediate/tainted versions packer seems to patch the spec file to the version given in `.packit.yaml` (which is the latest git-tag), then the filename and version would be inconsistent.
This commit is contained in:
parent
0563b845be
commit
30166b07fc
1 changed files with 1 additions and 1 deletions
2
Makefile
2
Makefile
|
|
@ -47,7 +47,7 @@ GOLANGCI_COMPOSER_IMAGE=composer_golangci
|
|||
# pre-fetched but evaluated at time of use.
|
||||
#
|
||||
|
||||
VERSION := $(shell (cd "$(SRCDIR)" && grep "^Version:" image-builder-cli.spec | sed -n 's/^[^0-9]*\([1-9][0-9]*\(\.[1-9][0-9]*\)*\)/\1/p'))
|
||||
VERSION := $(shell ( git describe --tags --abbrev=0 2>/dev/null || echo v1 ) | sed 's|v||')
|
||||
COMMIT = $(shell (cd "$(SRCDIR)" && git rev-parse HEAD))
|
||||
PACKAGE_NAME_VERSION = image-builder-cli-$(VERSION)
|
||||
PACKAGE_NAME_COMMIT = image-builder-cli-$(COMMIT)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue