Skip to content

Commit

Permalink
wip: use sensibel version number
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Jan 13, 2025
1 parent 632d631 commit 6bb398e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/linux-system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,23 @@ jobs:
run: |
ln -s tools/linux/deb/ubuntu-${{ matrix.distribution }}/debian ./
BUILD_VERSION="1.2.3-dev+asda"
# Build a version number for this build
GH_REF="${GITHUB_REF##*/}"
GH_REF=$(echo "$GH_REF" | sed 's/[\/]/_/g' | sed 's/ /_/g')
VERSION_MAJOR=$(grep -oPi 'set\(CONFIG_VERSION_MAJOR \K\d+' src/CMakeLists.txt)
VERSION_MINOR=$(grep -oPi 'set\(CONFIG_VERSION_MINOR \K\d+' src/CMakeLists.txt)
VERSION_PATCH=$(grep -oPi 'set\(CONFIG_VERSION_BUG \K\d+' src/CMakeLists.txt)
BUILD_VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${GH_REF}+${GITHUB_SHA:0:7}"
echo "BUILD_VERSION=$BUILD_VERSION" >> $GITHUB_OUTPUT
echo "Building as $BUILD_VERSION"
# install some needed tooling
sudo apt-get update
sudo apt-get -y install software-properties-common
sudo add-apt-repository ppa:casparcg/ppa
sudo apt-get install build-essential dpkg-dev debhelper
sudo apt-get install build-essential dpkg-dev debhelper devscripts
# Put something in the changelog
export DEBEMAIL="builds@casparcg.com"
Expand Down

0 comments on commit 6bb398e

Please sign in to comment.