diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2022-06-22 16:20:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-22 16:20:02 +0100 |
| commit | bd41776a5aa86cc6294e3ec17ea9b46c9c5780df (patch) | |
| tree | 50f65f7f4134d2705712d76138cbb9f9053965b9 /.github/workflows | |
| parent | c2ff3d9e76301230b32ffc5f8f30bc5d6aa73625 (diff) | |
| parent | 593f24a2ecf86a2a4db3545a21ff4c75ee526f45 (diff) | |
Merge pull request #227 from fufexan/meson
Nix: use meson for builds
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/version-update.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/.github/workflows/version-update.sh b/.github/workflows/version-update.sh new file mode 100644 index 00000000..1bf95af9 --- /dev/null +++ b/.github/workflows/version-update.sh @@ -0,0 +1,26 @@ +name: "Nix & Meson: update version" + +on: [push, workflow_dispatch] + +jobs: + update: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v3 + - name: Update flake and meson version + run: | + REGEX="([0-9]+(\.[0-9a-zA-Z]+)+)" + + CRT_REV=$(git show-ref --tags --head --abbrev | head -n 1 | head -c 7) + TAG_REV=$(git show-ref --tags --abbrev | tail -n 1 | head -c 7) + CRT_VER=$(sed -nEe "/$REGEX/{p;q;}" meson.build | awk -F\' '{print $2}') + VERSION=$(git show-ref --tags --abbrev | tail -n 1 | tail -c +20) + + if [[ $TAG_REV = $CRT_REV ]] || [[ $CRT_VER != $VERSION ]]; then + sed -Ei "s/$REGEX/$VERSION/g" meson.build + sed -Ei "s/$REGEX/$VERSION/g" flake.nix + fi + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "[gha] bump flake and meson version" |
