Skip to content

Commit

Permalink
Merge pull request #1289 from vojtechtrefny/main_packit-release-fix
Browse files Browse the repository at this point in the history
Release process fixes in Makefile and packit
  • Loading branch information
vojtechtrefny authored Sep 18, 2024
2 parents 98e0e11 + f30cb98 commit 312d4da
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
19 changes: 16 additions & 3 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -96,3 +108,4 @@ srpm_build_deps:
- python3-setuptools

downstream_package_name: python-blivet
upstream_tag_template: blivet-{version}
13 changes: 2 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 312d4da

Please sign in to comment.