Skip to content

Commit

Permalink
github: fix build-rpm-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Wheeler committed Aug 14, 2024
1 parent f5d0427 commit 8c36042
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/build-rpm-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,26 @@ jobs:
- name: Determine version and dist
id: version
run: |
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0")
TAG=$(git describe --tags --exact-match 2>/dev/null || echo "notag")
if [ "$TAG" = "notag" ]; then
# Get the most recent tag, and check if the latest commit is tagged
LATEST_TAG=$(git describe --tags --abbrev=0)
TAGGED_COMMIT=$(git describe --tags --exact-match 2>/dev/null || echo "notag")
if [ "$TAGGED_COMMIT" = "notag" ]; then
VERSION="${LATEST_TAG}+"
DIST="-git"
else
VERSION=$LATEST_TAG
DIST=""
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "DIST=$DIST" >> $GITHUB_ENV
- name: Build RPM packages in Docker
run: |
docker run --rm -v $(pwd):/workspace -w /workspace ${{ matrix.os }} /bin/bash -c "
sudo dnf install -y rpm-build make autoconf automake libtool gcc gettext-devel gtk3-devel desktop-file-utils glib2-devel intltool
sudo dnf install -y rpm-build dnf-plugins-core
sudo dnf builddep -y ~/rpmbuild/SPECS/xnec2c.spec || exit 1
./autogen.sh
./configure
make
Expand Down

0 comments on commit 8c36042

Please sign in to comment.