diff --git a/.travis.yml b/.travis.yml index 9d21f65223..728adc45ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,4 +4,4 @@ language: objective-c python: - 3.6 script: -- travis_wait 40 python PyBuild.py --skipioscodesigning --forceprebuild --skipreleasebuild +- travis_wait 40 python CI/PyBuild.py --skipioscodesigning --forceprebuild --skipreleasebuild --preserveworkingdir diff --git a/PyBuild.py b/CI/PyBuild.py similarity index 99% rename from PyBuild.py rename to CI/PyBuild.py index 1df4690bb5..4c5f5fba7e 100644 --- a/PyBuild.py +++ b/CI/PyBuild.py @@ -1408,6 +1408,7 @@ def MainLogic(): parser.add_argument('--skipaura', action="store_true", help='If enabled, will skip building aura.') parser.add_argument('--skipdx11', action="store_true", help='If enabled, will skip building DX11.') parser.add_argument('--xcodederiveddatapath', type=str, default='Null', help = 'Uses a specific path relative to root of project for derived data. If null then it uses the default location for derived data') + parser.add_argument('--preserveworkingdir', action="store_true", help='If enabled, will keep working directory as is instead of changing it to path of PyBuild.') #TODO: remove the test in parse_args arguments = parser.parse_args() @@ -1423,8 +1424,9 @@ def MainLogic(): signal.signal(signal.SIGINT, CleanupHandler) #change path to scripts location - print (sys.path[0]) - os.chdir(sys.path[0]) + if not arguments.preserveworkingdir: + os.chdir(sys.path[0]) + returnCode = 0 if (arguments.xbox is not True and arguments.xboxonly is not True) or "XboxOneXDKLatest" not in os.environ: