[gnome-photos/gnome-3-30] build: Ensure that the Git submodules are kept updated



commit ed2a797b300c98a4736a9b32e42d27ce40fa6c29
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 b6193c76..640e317f 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]