[gnome-photos/wip/rishi/meson-submodules: 4/4] build: Ensure that the Git submodules are kept updated



commit e30a016bb55c4deed4d421348a2e9edf7d39d38a
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Sep 25 07:56:38 2018 +0200

    build: Ensure that the Git submodules are kept updated
    
    It's assumed that those building release tarballs, like distributions,
    might not have Git in their buildroots. Therefore, this is skipped for
    'plain' builds.
    
    https://gitlab.gnome.org/GNOME/gnome-photos/merge_requests/59

 meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 80892311..e9040dba 100644
--- a/meson.build
+++ b/meson.build
@@ -29,6 +29,11 @@ po_dir = join_paths(source_root, 'po')
 
 top_inc = include_directories('.')
 
+git = find_program('git')
+if not photos_buildtype.contains('plain')
+  run_command(git, '-C', source_root, 'submodule', 'update', '--init', '--recursive')
+endif
+
 cc = meson.get_compiler('c')
 
 config_h = configuration_data()
@@ -37,7 +42,6 @@ config_h.set_quoted('PACKAGE_TARNAME', meson.project_name())
 config_h.set_quoted('PACKAGE_URL', 'https://wiki.gnome.org/Apps/Photos')
 config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
 
-git = find_program('git')
 res = run_command(git, '-C', source_root, 'describe')
 if res.returncode() == 0
   config_h.set_quoted('PACKAGE_COMMIT_ID', res.stdout().strip())


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