mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-09-11 13:25:42 +03:00
Build: use props file for versioning
This commit is contained in:
parent
98ce867104
commit
a54247125f
@ -1,6 +1,12 @@
|
|||||||
cmake_minimum_required(VERSION 3.4)
|
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
|
project(Hyprland
|
||||||
DESCRIPTION "A Modern C++ Wayland Compositor"
|
DESCRIPTION "A Modern C++ Wayland Compositor"
|
||||||
|
VERSION ${VER}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(CMAKE_MESSAGE_LOG_LEVEL "STATUS")
|
set(CMAKE_MESSAGE_LOG_LEVEL "STATUS")
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
|
|
||||||
pkgsFor = nixpkgs.legacyPackages;
|
pkgsFor = nixpkgs.legacyPackages;
|
||||||
|
|
||||||
|
props = builtins.fromJSON (builtins.readFile ./props.json);
|
||||||
|
|
||||||
mkDate = longDate: (lib.concatStringsSep "-" [
|
mkDate = longDate: (lib.concatStringsSep "-" [
|
||||||
(builtins.substring 0 4 longDate)
|
(builtins.substring 0 4 longDate)
|
||||||
(builtins.substring 4 2 longDate)
|
(builtins.substring 4 2 longDate)
|
||||||
@ -46,7 +48,7 @@
|
|||||||
};
|
};
|
||||||
hyprland = prev.callPackage ./nix/default.nix {
|
hyprland = prev.callPackage ./nix/default.nix {
|
||||||
stdenv = prev.gcc12Stdenv;
|
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;
|
wlroots = wlroots-hyprland;
|
||||||
inherit (inputs) hyprland-protocols;
|
inherit (inputs) hyprland-protocols;
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
project('Hyprland', 'cpp', 'c',
|
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 : [
|
default_options : [
|
||||||
'warning_level=2',
|
'warning_level=2',
|
||||||
'default_library=static',
|
'default_library=static',
|
||||||
|
1
props.json
Normal file
1
props.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version": "0.20.0"}
|
Loading…
Reference in New Issue
Block a user