modify args of [console].

This commit is contained in:
andyque 2014-03-20 10:24:10 +08:00
parent 2f5e9ed654
commit 4bd7a60ca9
2 changed files with 8 additions and 17 deletions

View File

@ -17,6 +17,8 @@ if os.environ.has_key('payload'):
console_cmd = payload['console']
print 'console_param:',console_param
console_param_arr = console_param.split(' ')
project_types = ['cpp', 'lua']
PROJ_SUFFIX = 'Proj'
phonePlats = ['mac','ios','android']
@ -31,10 +33,6 @@ runSupport = {
'linux' : [0, 0, 1]
}
_will_run = False
if console_cmd=='run':
_will_run = True
curPlat = sys.platform
if curPlat.find('linux') >= 0:
curPlat = 'linux'
@ -74,7 +72,7 @@ def build_run():
def main():
clean_project()
create_project()
if _will_run:
if console_param_arr.count('run'):
build_run()
# -------------- main --------------

View File

@ -28,14 +28,9 @@ def main():
result = pattern.search(comment_body)
# will check console/console create
patternCrt = re.compile("\[console(\s+)create\]", re.I)
resCrt = patternCrt.search(comment_body)
resRun = None
if resCrt = None:
patternRun = re.compile("\[console\]", re.I)
resRun = patternRun.search(comment_body);
searchConsole = re.search('\[console.*\]', comment_body)
if result is None and resCrt is None and resRun is None:
if result is None and searchConsole is None:
print 'skip build for pull request #' + str(pr_num)
return(0)
@ -87,12 +82,10 @@ def main():
job_trigger_url = ''
if result:
job_trigger_url = os.environ['JOB_TRIGGER_URL']
if resultCrt:
if searchConsole:
consoleOper = searchConsole.group()
job_trigger_url = os.environ['JOB_CONSOLE_TEST_URL']
payload_forword['console'] = 'create'
if resultRun:
job_trigger_url = os.environ['JOB_CONSOLE_TEST_URL']
payload_forword['console'] = 'run'
payload_forword['console'] = consoleOper
print 'job_trigger_url is: ', job_trigger_url
#send trigger and payload