mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 05:45:59 +01:00
workflows: add meson version updater and update versions
This commit is contained in:
parent
8bd7234d72
commit
593f24a2ec
3 changed files with 28 additions and 2 deletions
26
.github/workflows/version-update.sh
vendored
Normal file
26
.github/workflows/version-update.sh
vendored
Normal file
|
@ -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"
|
|
@ -32,7 +32,7 @@
|
|||
src = inputs.wlroots;
|
||||
});
|
||||
hyprland = prev.callPackage ./nix/default.nix {
|
||||
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101"));
|
||||
version = "0.5.0beta" + "+date=" + (mkDate (self.lastModifiedDate or "19700101"));
|
||||
wlroots = wlroots-hyprland;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
project('Hyprland', 'cpp', 'c',
|
||||
version : '0.1',
|
||||
version : '0.5.0beta',
|
||||
default_options : ['warning_level=3', 'cpp_std=c++20', 'default_library=static'])
|
||||
|
||||
wlroots = subproject('wlroots', default_options: ['examples=false'])
|
||||
|
|
Loading…
Reference in a new issue