aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMihai Fufezan <[email protected]>2022-06-18 01:26:46 +0300
committerMihai Fufezan <[email protected]>2022-06-21 22:28:20 +0300
commit593f24a2ecf86a2a4db3545a21ff4c75ee526f45 (patch)
treecb546488aa73246e7f7fad01118f425d0a11b69a
parent8bd7234d7256d494794741f973f470458a1ad904 (diff)
downloadHyprland-593f24a2ecf86a2a4db3545a21ff4c75ee526f45.tar.gz
Hyprland-593f24a2ecf86a2a4db3545a21ff4c75ee526f45.zip
workflows: add meson version updater and update versions
-rw-r--r--.github/workflows/version-update.sh26
-rw-r--r--flake.nix2
-rw-r--r--meson.build2
3 files changed, 28 insertions, 2 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"
diff --git a/flake.nix b/flake.nix
index 8500c7a4..9d5569d7 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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;
};
};
diff --git a/meson.build b/meson.build
index b902c80a..f75f64fd 100644
--- a/meson.build
+++ b/meson.build
@@ -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'])