Skip to content

Commit 5082c74

Browse files
authored
Merge pull request #30 from Project-Ro-ASD/codex/release-hotfix
fix: repair RPM CI and release workflows
2 parents 4383965 + c0792ae commit 5082c74

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ jobs:
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: |

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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/

packaging/rpm/ro-control.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
%global upstream_version %{!?upstream_version:0.1.0}%{?upstream_version}
2+
%global debug_package %{nil}
23

34
Name: ro-control
45
Version: %{upstream_version}

0 commit comments

Comments
 (0)