mirror of
https://github.com/containers/skopeo.git
synced 2025-09-26 20:31:41 +08:00
Packit/RPM: Epoch and version fetching fixes
1. Packit config includes a `get-current-version` action to fetch the version from `version/version.go` and not from the default `git describe`. So, the copr rpm version will always be ahead of what's in the official repos. 2. The absurdly high RPM Epoch is now limited to builds from rhcontainerbot/podman-next copr. So, copr builds on PR jobs will use the default Epoch value. These two changes will make it easier for testers to fetch the scratch copr builds from upstream PRs and it should allow for seamless upgrades. (official rpm -> test copr rpm for bugfix -> upgrade to new official rpm) Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:

committed by
Miloslav Trmač

parent
ee194d4c44
commit
af27d1d877
@@ -19,7 +19,9 @@ packages:
|
|||||||
skopeo-eln:
|
skopeo-eln:
|
||||||
specfile_path: rpm/skopeo.spec
|
specfile_path: rpm/skopeo.spec
|
||||||
|
|
||||||
|
# https://packit.dev/docs/configuration/actions
|
||||||
actions:
|
actions:
|
||||||
|
get-current-version: bash -c 'grep "^const Version" version/version.go | cut -f2 -d\" | tr \- \~'
|
||||||
prepare-files: >-
|
prepare-files: >-
|
||||||
bash -c "sed -i 's/^\(\s*\)ref: .*/\1ref: \"${PACKIT_PROJECT_TAG}\"/' ${PACKIT_DOWNSTREAM_REPO}/plans/main.fmf"
|
bash -c "sed -i 's/^\(\s*\)ref: .*/\1ref: \"${PACKIT_PROJECT_TAG}\"/' ${PACKIT_DOWNSTREAM_REPO}/plans/main.fmf"
|
||||||
|
|
||||||
|
@@ -26,8 +26,13 @@
|
|||||||
%define conditional_epoch 2
|
%define conditional_epoch 2
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# set higher Epoch only for podman-next builds
|
||||||
|
%if %{defined copr_username} && "%{copr_username}" == "rhcontainerbot" && "%{copr_projectname}" == "podman-next"
|
||||||
|
%define next_build 1
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: skopeo
|
Name: skopeo
|
||||||
%if %{defined copr_username}
|
%if %{defined next_build}
|
||||||
Epoch: 102
|
Epoch: 102
|
||||||
%else
|
%else
|
||||||
Epoch: %{conditional_epoch}
|
Epoch: %{conditional_epoch}
|
||||||
|
Reference in New Issue
Block a user