Skip to content

Commit

Permalink
Get version from pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
lkiesow committed Mar 28, 2024
1 parent 956aaa9 commit f541756
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
3 changes: 1 addition & 2 deletions .github/rpm/opencast-camera-control.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Created by pyp2rpm-3.3.8
%global pypi_name opencast-camera-control
%global pypi_version 0.1.0
%global pypi_version %{_camera_control_version}

%define uid opencastcamera
%define gid opencastcamera
Expand All @@ -13,7 +13,6 @@ Summary: Automated Camera Control for Opencast
License: GPLv3+

URL: None
#Source0: %{pypi_source}
Source0: https://github.com/virtUOS/%{name}/archive/refs/tags/%{version}.tar.gz
Source1: https://raw.githubusercontent.com/virtUOS/%{name}/%{version}/camera-control.yml
Source2: opencast-camera-control.service
Expand Down
25 changes: 5 additions & 20 deletions .github/workflows/build-rpms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ jobs:
echo "${GPG_KEY}" | gpg --import
echo '%_gpg_name D1D3C4C53BB1516C13C86647F3AC651D45D407D3' > ~/.rpmmacros
- name: get version
run: >
sed -n 's/^version *=[^0-9]*\(.*\). */%_camera_control_version \1/p'
pyproject.toml >> ~/.rpmmacros
- name: prepare build tree
run: |
rpmdev-setuptree
Expand Down Expand Up @@ -95,23 +100,3 @@ jobs:
run: |
git remote -v
echo git push
- name: set up matrix-msg
if: always()
uses: lkiesow/matrix-notification@v1
with:
room: '!gwaqKjZRpCQkpkTVwh:matrix.org'
token: ${{ secrets.MATRIX_TOKEN }}
tool: true

- name: send success notification
run: |
RPM="$(ls -1 ~/rpmbuild/RPMS/x86_64/ | tail -n1)"
~/.local/bin/matrix-msg "Finished building ${RPM} for Audiobookshelf"
- name: send failure notification
if: failure()
run: |
VERSION="$(sed -n 's/^Version: *//p' audiobookshelf.spec)"
OS="(el${{ matrix.osversion }})"
~/.local/bin/matrix-msg "Building Audiobookshelf ${VERSION} RPMs ${OS} failed"

0 comments on commit f541756

Please sign in to comment.