Add new feature: Support build with sub modules togeter 85/258085/1
authorbiao716.wang <biao716.wang@samsung.com>
Mon, 10 May 2021 08:52:37 +0000 (17:52 +0900)
committerbiao716.wang <biao716.wang@samsung.com>
Mon, 10 May 2021 08:52:37 +0000 (17:52 +0900)
Change-Id: I95a19c957e2d47176c99ebb922eb16f19ace00a3
Signed-off-by: biao716.wang <biao716.wang@samsung.com>
gitbuildsys/cmd_build.py
gitbuildsys/cmd_export.py
tools/gbs

index 0041deac1728fe5b3f38c220975926556138729d..bd1b467ea9897e606889c20aeb2cd3eb49a04bbc 100644 (file)
@@ -245,6 +245,8 @@ def prepare_depanneur_simple_opts(args):
         cmd_opts += ['--style=%s' % args.style]
     if args.export_only:
         cmd_opts += ['--export-only']
+    if args.with_submodules:
+        cmd_opts += ['--with-submodules']
 
     return cmd_opts
 
index 3d228440190ff717455a488ebbba94fa5f8db778..eed826162e69c623b18338b67d96441c04ff37e2 100644 (file)
@@ -205,6 +205,8 @@ def create_gbp_export_args(repo, commit, export_dir, tmp_dir, spec, args,
                     ])
     else:
         argv.extend(["--git-builder=osc", "--git-no-build"])
+    if args.with_submodules:
+        argv.append('--git-submodules')
 
     return argv
 
index 2d9796f9d81d1f044aa6501ffcb8b42f8bab000d..bcab7838c59d0c029d5ed6423f595182776503cd 100755 (executable)
--- a/tools/gbs
+++ b/tools/gbs
@@ -136,6 +136,8 @@ def export_parser(parser):
     parser.add_argument('--outdir-directly', action='store_true',
                         help='Use the directory of --outdir parameter directly'
                         'rather than outdir/pkg-version-release')
+    parser.add_argument('--with-submodules', action='store_true',
+                        help='export source code also with submodule code togerther')
 
     parser.set_defaults(alias="ex")
     return parser
@@ -343,6 +345,8 @@ def build_parser(parser):
                         'either comma separated string or local file location.')
     group.add_argument('--profiling', default='',
                         help='Profiling report location to be used package ordering.')
+    group.add_argument('--with-submodules', action='store_true',
+                        help='build project with submodules togerther')
 
     parser.set_defaults(alias="lb")
     return parser