From 00210d25f19ae19267786060fa037fd95cc3786c Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Mon, 3 Sep 2012 16:36:48 +0300 Subject: [PATCH] Introduced base_prj and target_prj config parameters. Saves a lot of typing in command line. Fixes #242 Change-Id: Ie2b057bee031d18d89816123078826b17eed71fb --- gitbuildsys/cmd_remotebuild.py | 6 +++--- gitbuildsys/conf.py | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gitbuildsys/cmd_remotebuild.py b/gitbuildsys/cmd_remotebuild.py index de7d673..1cf58b1 100644 --- a/gitbuildsys/cmd_remotebuild.py +++ b/gitbuildsys/cmd_remotebuild.py @@ -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 diff --git a/gitbuildsys/conf.py b/gitbuildsys/conf.py index 198e838..15bab9f 100644 --- a/gitbuildsys/conf.py +++ b/gitbuildsys/conf.py @@ -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 -- 2.7.4