mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-23 14:55:57 +01:00
Unify version
This commit is contained in:
parent
cfd866ab66
commit
04d8fe8431
4 changed files with 11 additions and 3 deletions
|
@ -1,8 +1,11 @@
|
|||
cmake_minimum_required(VERSION 3.19)
|
||||
|
||||
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION VER)
|
||||
string(STRIP ${VER} VER)
|
||||
|
||||
project(xdg-desktop-portal-hyprland
|
||||
DESCRIPTION "An XDG-Destop-Portal backend for Hyprland (and wlroots)"
|
||||
VERSION "2.0"
|
||||
VERSION ${VER}
|
||||
)
|
||||
|
||||
set(CMAKE_MESSAGE_LOG_LEVEL "STATUS")
|
||||
|
|
1
VERSION
Normal file
1
VERSION
Normal file
|
@ -0,0 +1 @@
|
|||
1.0.0
|
|
@ -1,5 +1,5 @@
|
|||
project('xdg-desktop-portal-hyprland', 'cpp', 'c',
|
||||
version: '2.0.0',
|
||||
version: run_command('cat', files('VERSION'), check: true).stdout().strip(),
|
||||
license: 'BSD-3-Clause',
|
||||
meson_version: '>=0.63.0',
|
||||
default_options: [
|
||||
|
|
|
@ -3,14 +3,18 @@
|
|||
inputs,
|
||||
lib,
|
||||
}: let
|
||||
ver = lib.removeSuffix "\n" (builtins.readFile ../VERSION);
|
||||
|
||||
mkJoinedOverlays = overlays: final: prev:
|
||||
lib.foldl' (attrs: overlay: attrs // (overlay final prev)) {} overlays;
|
||||
|
||||
mkDate = longDate: (lib.concatStringsSep "-" [
|
||||
(builtins.substring 0 4 longDate)
|
||||
(builtins.substring 4 2 longDate)
|
||||
(builtins.substring 6 2 longDate)
|
||||
]);
|
||||
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
||||
|
||||
version = ver + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
||||
in {
|
||||
default = mkJoinedOverlays (with self.overlays; [
|
||||
xdg-desktop-portal-hyprland
|
||||
|
|
Loading…
Reference in a new issue