Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ jobs:

- name: Prepare source tarball
run: |
VERSION="$(awk '/^Version:/ {print $2}' packaging/rpm/ro-control.spec)"
VERSION="$(sed -n 's/^[[:space:]]*VERSION[[:space:]]\([0-9.][0-9.]*\)$/\1/p' CMakeLists.txt | head -n1)"
if [[ -z "${VERSION}" ]]; then
echo "Failed to read Version from packaging/rpm/ro-control.spec" >&2
echo "Failed to read project version from CMakeLists.txt" >&2
exit 1
fi
ARCHIVE_BASENAME="ro-control-${VERSION}"
Expand All @@ -112,7 +112,8 @@ jobs:
- name: Build RPM
run: |
rpmbuild -ba "${HOME}/rpmbuild/SPECS/ro-control.spec" \
--define "_topdir ${HOME}/rpmbuild"
--define "_topdir ${HOME}/rpmbuild" \
--define "upstream_version ${VERSION}"

- name: Lint built RPMs
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
--define "upstream_version ${VERSION}" \
--define "dist .fc42"

cp ~/rpmbuild/RPMS/*/*.rpm dist/rpm/
find ~/rpmbuild/RPMS -maxdepth 2 -type f -name "ro-control-[0-9]*.${RPM_ARCH}.rpm" -exec cp {} dist/rpm/ \;

if [[ "${RPM_ARCH}" == "x86_64" ]]; then
cp ~/rpmbuild/SRPMS/*.src.rpm dist/rpm/
Expand Down
1 change: 1 addition & 0 deletions packaging/rpm/ro-control.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
%global upstream_version %{!?upstream_version:0.1.0}%{?upstream_version}
%global debug_package %{nil}

Name: ro-control
Version: %{upstream_version}
Expand Down
Loading