File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9393
9494 - name : Prepare source tarball
9595 run : |
96- VERSION="$(awk '/^Version:/ {print $2}' packaging/rpm/ro-control.spec )"
96+ VERSION="$(sed -n 's/^[[:space:]]*VERSION[[:space:]]\([0-9.][0-9.]*\)$/\1/p' CMakeLists.txt | head -n1 )"
9797 if [[ -z "${VERSION}" ]]; then
98- echo "Failed to read Version from packaging/rpm/ro-control.spec " >&2
98+ echo "Failed to read project version from CMakeLists.txt " >&2
9999 exit 1
100100 fi
101101 ARCHIVE_BASENAME="ro-control-${VERSION}"
@@ -112,7 +112,8 @@ jobs:
112112 - name : Build RPM
113113 run : |
114114 rpmbuild -ba "${HOME}/rpmbuild/SPECS/ro-control.spec" \
115- --define "_topdir ${HOME}/rpmbuild"
115+ --define "_topdir ${HOME}/rpmbuild" \
116+ --define "upstream_version ${VERSION}"
116117
117118 - name : Lint built RPMs
118119 run : |
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ jobs:
145145 --define "upstream_version ${VERSION}" \
146146 --define "dist .fc42"
147147
148- cp ~/rpmbuild/RPMS/*/*. rpm dist/rpm/
148+ find ~/rpmbuild/RPMS -maxdepth 2 -type f -name "ro-control-[0-9]*.${RPM_ARCH}. rpm" -exec cp {} dist/rpm/ \;
149149
150150 if [[ "${RPM_ARCH}" == "x86_64" ]]; then
151151 cp ~/rpmbuild/SRPMS/*.src.rpm dist/rpm/
Original file line number Diff line number Diff line change 11%global upstream_version %{! ?upstream_version:0.1.0}%{?upstream_version }
2+ %global debug_package %{nil }
23
34Name: ro-control
45Version: %{upstream_version }
You can’t perform that action at this time.
0 commit comments