FIXUP: .packit.yaml: fix issues when building SRPM

FWIW, I never get || and && correctly in Bash for the first time :D

Also handle the case then the repository does not contain any version
tags yet by defaulting to "1".

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2024-12-19 11:23:58 +01:00 committed by Simon de Vlieger
parent f4fa09abf3
commit 3ae39416c7

View file

@ -15,8 +15,8 @@ srpm_build_deps:
- golang
actions:
get-current-version: bash -c "git describe --tags --abbrev=0 | sed 's|v||'"
post-upstream-clone: bash -c "go mod vendor && ./tools/rpm_spec_add_provides_bundle.sh"
get-current-version: bash -c "git describe --tags --abbrev=0 | sed 's|v||' && echo 1"
post-upstream-clone: bash -c "go mod vendor || ./tools/rpm_spec_add_provides_bundle.sh"
create-archive: bash -c "make release_artifacts"
# Handle only releases without a "dot" (e.g. v88.2), since "dot" releases should never be released to Fedora