build script - add optional preBuild and postBuild settings, to allow one or more additional commands to be executed as part of a build.
could be used to copy builds to a web server, copy additional files (E.g. .htaccess), trigger browser refresh, etc
This commit is contained in:
10
build.py
10
build.py
@ -168,6 +168,11 @@ else:
|
||||
os.makedirs(outDir)
|
||||
|
||||
|
||||
# run any preBuild commands
|
||||
for cmd in settings.get('preBuild',[]):
|
||||
os.system ( cmd )
|
||||
|
||||
|
||||
# load main.js, parse, and create main total-conversion-build.user.js
|
||||
main = readfile('main.js')
|
||||
|
||||
@ -242,4 +247,9 @@ if buildMobile:
|
||||
shutil.copy("mobile/bin/IITC_Mobile-%s.apk" % buildMobile, os.path.join(outDir,"IITC_Mobile-%s.apk" % buildMobile) )
|
||||
|
||||
|
||||
# run any postBuild commands
|
||||
for cmd in settings.get('postBuild',[]):
|
||||
os.system ( cmd )
|
||||
|
||||
|
||||
# vim: ai si ts=4 sw=4 sts=4 et
|
||||
|
Reference in New Issue
Block a user