From c1d2eee02f390c014a121a5e86481b9ed31c070b Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Tue, 17 Sep 2024 15:11:41 +0200 Subject: [PATCH 1/3] Makefile: Create just one tag for the release We don't need the "-1" in the tag and it confuses packit. --- Makefile | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 106f9a205..4ab890cc4 100644 --- a/Makefile +++ b/Makefile @@ -124,17 +124,8 @@ ChangeLog: (GIT_DIR=.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) tag: - @if test $(VERSION) != $(RPMVERSION) ; then \ - tags='$(VERSION_TAG) $(RELEASE_TAG)' ; \ - elif test $(RPMRELEASE) = "1" ; then \ - tags='$(VERSION_TAG) $(RELEASE_TAG)' ; \ - else \ - tags='$(RELEASE_TAG)' ; \ - fi ; \ - for tag in $$tags ; do \ - git tag -a -s -m "Tag as $$tag" -f $$tag ; \ - echo "Tagged as $$tag" ; \ - done + git tag -a -s -m "Tag as $(VERSION_TAG)" -f "$(VERSION_TAG)" && \ + echo "Tagged as $(VERSION_TAG)" release: tag archive From 8f9635718bd4cecc29c0e31437de49ba7acb0417 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Tue, 17 Sep 2024 15:12:18 +0200 Subject: [PATCH 2/3] packit: Bump release only for daily builds not for regular builds We don't want the -99 release in the downstream builds. --- .packit.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index 0cd9bbd12..5319d6a99 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -1,7 +1,4 @@ actions: - post-upstream-clone: - # bump release to 99 to always be ahead of Fedora builds - - 'bash -c "sed -i -r \"s/Release:(\s*)\S+/Release: 99%{?dist}/\" python-blivet.spec"' get-current-version: - "python3 ./setup.py --version" create-archive: @@ -36,6 +33,21 @@ jobs: project: blivet-daily branch: main preserve_project: true + actions: + post-upstream-clone: + # bump release to 99 to always be ahead of Fedora builds + - 'bash -c "sed -i -r \"s/Release:(\s*)\S+/Release: 99%{?dist}/\" python-blivet.spec"' + get-current-version: + - "python3 ./setup.py --version" + create-archive: + - "make local" + - 'bash -c "ls *.tar*"' + fix-spec-file: + # define the Source variables + - bash -c "sed -i python-blivet.spec -e \"s/http.*%{realname}-%{realversion}.tar.gz/blivet-${PACKIT_PROJECT_VERSION}.tar.gz/\"" + - bash -c "sed -i python-blivet.spec -e \"s/http.*%{realname}-%{realversion}-tests.tar.gz/blivet-${PACKIT_PROJECT_VERSION}-tests.tar.gz/\"" + # fill in Release as if packit would have done it + - bash -c "sed -i python-blivet.spec -e \"s/Release:.*/Release:\ ${PACKIT_RPMSPEC_RELEASE}%{?dist}/\"" # Fedora tests for the 'main' branch - job: tests From f30cb984db49de3a07ddfd1611653ef803bd7072 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Tue, 17 Sep 2024 15:13:01 +0200 Subject: [PATCH 3/3] packit: Add upstream_tag_template --- .packit.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.packit.yaml b/.packit.yaml index 5319d6a99..f3671c4e8 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -108,3 +108,4 @@ srpm_build_deps: - python3-setuptools downstream_package_name: python-blivet +upstream_tag_template: blivet-{version}