diff --git a/CMakeLists.txt b/CMakeLists.txt index e951b8740b1..b65d361e1c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,8 +4,8 @@ include(CheckIncludeFile) include(GNUInstallDirs) # Get version -file(READ ${CMAKE_CURRENT_SOURCE_DIR}/props.json PROPS) -string(JSON VER GET ${PROPS} version) +file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW) +string(STRIP ${VER_RAW} VER) project(Hyprland DESCRIPTION "A Modern C++ Wayland Compositor" diff --git a/VERSION b/VERSION new file mode 100644 index 00000000000..6599454d402 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.41.2 diff --git a/meson.build b/meson.build index b8101f6c040..4446ea0fbb2 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('Hyprland', 'cpp', 'c', - version : run_command('jq', '-r', '.version', join_paths(meson.source_root(), 'props.json'), check: true).stdout().strip(), + version : run_command('cat', join_paths(meson.source_root(), 'VERSION'), check: true).stdout().strip(), default_options : [ 'warning_level=2', 'default_library=static', diff --git a/nix/overlays.nix b/nix/overlays.nix index 9d100d51e83..d8979b45850 100644 --- a/nix/overlays.nix +++ b/nix/overlays.nix @@ -3,13 +3,12 @@ lib, inputs, }: let - props = builtins.fromJSON (builtins.readFile ../props.json); - mkDate = longDate: (lib.concatStringsSep "-" [ (builtins.substring 0 4 longDate) (builtins.substring 4 2 longDate) (builtins.substring 6 2 longDate) ]); + version = lib.removeSuffix "\n" (builtins.readFile ../VERSION); in { # Contains what a user is most likely to care about: # Hyprland itself, XDPH and the Share Picker. @@ -33,7 +32,7 @@ in { in { hyprland = final.callPackage ./default.nix { stdenv = final.gcc13Stdenv; - version = "${props.version}+date=${date}_${self.shortRev or "dirty"}"; + version = "${version}+date=${date}_${self.shortRev or "dirty"}"; commit = self.rev or ""; inherit date; }; diff --git a/props.json b/props.json deleted file mode 100644 index 2ff7562e07a..00000000000 --- a/props.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "version": "0.41.2" -} \ No newline at end of file