[gnome-shell] extensions-app: Include commit hash in nightly version



commit 6bea1e7a47ac563f7c1d20f12767ab24907870cc
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Jan 22 22:07:42 2021 +0100

    extensions-app: Include commit hash in nightly version
    
    It's useful information for development snapshots, so include
    it when building from a git checkout.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3612
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1661>

 subprojects/extensions-app/js/meson.build | 6 +++++-
 subprojects/extensions-app/meson.build    | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/subprojects/extensions-app/js/meson.build b/subprojects/extensions-app/js/meson.build
index 3b54159212..f311db6e05 100644
--- a/subprojects/extensions-app/js/meson.build
+++ b/subprojects/extensions-app/js/meson.build
@@ -1,7 +1,11 @@
 launcherconf = configuration_data()
 launcherconf.set('app_id', app_id)
 launcherconf.set('PACKAGE_NAME', package_name)
-launcherconf.set('PACKAGE_VERSION', meson.project_version())
+if vcs_tag != ''
+  launcherconf.set('PACKAGE_VERSION', '@0@ (@1@)'.format(package_version, vcs_tag))
+else
+  launcherconf.set('PACKAGE_VERSION', package_version)
+endif
 launcherconf.set('prefix', prefix)
 launcherconf.set('libdir', libdir)
 launcherconf.set('pkgdatadir', pkgdatadir)
diff --git a/subprojects/extensions-app/meson.build b/subprojects/extensions-app/meson.build
index c68dfb1b1f..7e2d56b3ce 100644
--- a/subprojects/extensions-app/meson.build
+++ b/subprojects/extensions-app/meson.build
@@ -6,8 +6,10 @@ project('gnome-extensions-app',
 
 if get_option('profile') == 'development'
   profile = '.Devel'
+  vcs_tag = run_command('git', 'rev-parse', '--short', '@').stdout().strip()
 else
   profile = ''
+  vcs_tag = ''
 endif
 
 base_id = 'org.gnome.Extensions'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]