aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--flake.nix4
-rw-r--r--meson.build2
-rw-r--r--props.json1
4 files changed, 11 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f3752eaf..04d9ec23 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,12 @@
cmake_minimum_required(VERSION 3.4)
+
+# Get version
+file(READ ${CMAKE_CURRENT_SOURCE_DIR}/props.json PROPS)
+string(JSON VER GET ${PROPS} version)
+
project(Hyprland
DESCRIPTION "A Modern C++ Wayland Compositor"
+ VERSION ${VER}
)
set(CMAKE_MESSAGE_LOG_LEVEL "STATUS")
diff --git a/flake.nix b/flake.nix
index 45d17067..a6def7bd 100644
--- a/flake.nix
+++ b/flake.nix
@@ -33,6 +33,8 @@
pkgsFor = nixpkgs.legacyPackages;
+ props = builtins.fromJSON (builtins.readFile ./props.json);
+
mkDate = longDate: (lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate)
@@ -46,7 +48,7 @@
};
hyprland = prev.callPackage ./nix/default.nix {
stdenv = prev.gcc12Stdenv;
- version = "0.20.0beta" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
+ version = props.version + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
wlroots = wlroots-hyprland;
inherit (inputs) hyprland-protocols;
};
diff --git a/meson.build b/meson.build
index 5c096f8a..2f6892a0 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
project('Hyprland', 'cpp', 'c',
- version : '0.20.0beta',
+ version : run_command('jq', '-r', '.version', join_paths(meson.source_root(), 'props.json'), check: true).stdout().strip(),
default_options : [
'warning_level=2',
'default_library=static',
diff --git a/props.json b/props.json
new file mode 100644
index 00000000..e96cb77f
--- /dev/null
+++ b/props.json
@@ -0,0 +1 @@
+{"version": "0.20.0"}