diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 122a4ec..ef845cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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}" @@ -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: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e20cb1..e35bfa0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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/ diff --git a/packaging/rpm/ro-control.spec b/packaging/rpm/ro-control.spec index ea4b535..811f96e 100644 --- a/packaging/rpm/ro-control.spec +++ b/packaging/rpm/ro-control.spec @@ -1,4 +1,5 @@ %global upstream_version %{!?upstream_version:0.1.0}%{?upstream_version} +%global debug_package %{nil} Name: ro-control Version: %{upstream_version}