mirror of https://github.com/axmolengine/axmol.git
Merge pull request #6023 from lmskater/fix-generator-bindings-fail
[Jenkins] Make build as failed when generating bindings fails
This commit is contained in:
commit
1da2952c0a
|
@ -1,9 +1,16 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
ret = 0
|
||||
genbindings_dirs = ['tolua']
|
||||
for item in genbindings_dirs:
|
||||
os.chdir("tools/" + item)
|
||||
os.system('python genbindings.py')
|
||||
ret = os.system('python genbindings.py')
|
||||
os.chdir("../..")
|
||||
if(ret != 0):
|
||||
ret = 1
|
||||
break
|
||||
|
||||
sys.exit(ret)
|
||||
|
|
|
@ -103,16 +103,18 @@ def main():
|
|||
|
||||
# Generate binding glue codes
|
||||
if(branch == 'develop'):
|
||||
os.system("python tools/jenkins-scripts/gen_jsb.py")
|
||||
ret = os.system("python tools/jenkins-scripts/gen_jsb.py")
|
||||
elif(branch == 'master'):
|
||||
os.chdir('tools/tojs')
|
||||
if(platform.system() == 'Windows'):
|
||||
os.environ['NDK_ROOT'] = os.environ['NDK_ROOT_R8E']
|
||||
os.system("genbindings-win32.bat")
|
||||
ret = os.system("genbindings-win32.bat")
|
||||
os.environ['NDK_ROOT'] = os.environ['NDK_ROOT_R9B']
|
||||
else:
|
||||
os.system("./genbindings.sh")
|
||||
ret = os.system("./genbindings.sh")
|
||||
os.chdir('../..')
|
||||
if(ret != 0):
|
||||
return(1)
|
||||
|
||||
#make temp dir
|
||||
print "current dir is: " + os.environ['WORKSPACE']
|
||||
|
|
Loading…
Reference in New Issue