Introduced base_prj and target_prj config parameters.
authorEd Bartosh <eduard.bartosh@intel.com>
Mon, 3 Sep 2012 13:36:48 +0000 (16:36 +0300)
committerEd Bartosh <eduard.bartosh@intel.com>
Mon, 3 Sep 2012 13:42:44 +0000 (16:42 +0300)
Saves a lot of typing in command line.
Fixes #242

Change-Id: Ie2b057bee031d18d89816123078826b17eed71fb

gitbuildsys/cmd_remotebuild.py
gitbuildsys/conf.py

index de7d67330cdaa678f182b68fdd2b36344a593b37..1cf58b10fa548ffc657b4e19582260537ccbbfdf 100644 (file)
@@ -102,13 +102,13 @@ def do(opts, args):
     package = spec.name
 
     if opts.base_obsprj is None:
-        # TODO, get current branch of git to determine it
-        base_prj = 'Tizen:Main'
+       base_prj = configmgr.get('base_prj', 'remotebuild')
     else:
         base_prj = opts.base_obsprj
 
     if opts.target_obsprj is None:
-        target_prj = "home:%s:gbs:%s" % (USER, base_prj)
+        target_prj = configmgr.get('target_prj', 'remotebuild') or \
+                       "home:%s:gbs:%s" % (USER, base_prj)
     else:
         target_prj = opts.target_obsprj
 
index 198e838d24620f29e022a2389c15f532bc4564b3..15bab9f578024dbda4f6145206ac3f7e2def3bcd 100644 (file)
@@ -165,6 +165,8 @@ class ConfigMgr(object):
                 'build_server': 'https://api.tizen.org',
                 'user':         '',
                 'passwd':       '',
+                'base_prj':     'Tizen:Main',
+                'target_prj':   ''
             },
             'build': {
                 'build_cmd':    '/usr/bin/build',
@@ -184,6 +186,10 @@ build_server = $remotebuild__build_server
 user = $remotebuild__user
 ; CAUTION: please use the key name "passwd" to reset plaintext password
 passwdx = $remotebuild__passwdx
+; Default base project
+base_prj = $remotebuild__base_prj
+; Default target project
+target_prj = $remotebuild__target_prj
 
 [build]
 build_cmd = $build__build_cmd