Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
myrsloik committed Nov 16, 2024
2 parents 95afdcd + 5768ab1 commit ef74bdf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Update version in meson.build

on:
push:
paths:
- "src/version.h"

jobs:
update-version:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- run: |
VERSION_MAJOR=$(grep BEST_SOURCE_VERSION_MAJOR src/version.h | cut -d " " -f 3)
VERSION_MINOR=$(grep BEST_SOURCE_VERSION_MINOR src/version.h | cut -d " " -f 3)
sed -i -E -e "s/version: '[0-9]+.[0-9]+'/version: '${VERSION_MAJOR}.${VERSION_MINOR}'/" meson.build
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update version in meson.build
file_pattern: meson.build
5 changes: 1 addition & 4 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ project('BestSource', 'cpp',
default_options: ['buildtype=release', 'b_ndebug=if-release', 'cpp_std=c++17'],
license: 'MIT',
meson_version: '>=0.53.0',
version: '.'.join([
run_command('grep', 'BEST_SOURCE_VERSION_MAJOR', 'src/version.h', check: true).stdout().strip().split()[2],
run_command('grep', 'BEST_SOURCE_VERSION_MINOR', 'src/version.h', check: true).stdout().strip().split()[2],
])
version: '9.0',
)

api_sources = files(
Expand Down

0 comments on commit ef74bdf

Please sign in to comment.