mirror of https://github.com/axmolengine/axmol.git
modify args of [console].
This commit is contained in:
parent
2f5e9ed654
commit
4bd7a60ca9
|
@ -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 --------------
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue