diff --git a/tools/build.ps1 b/tools/build.ps1 index db94dbf1af..611d8af668 100644 --- a/tools/build.ps1 +++ b/tools/build.ps1 @@ -14,6 +14,12 @@ PS> .\build.ps1 #> +$arguments=$ARGS +$disable_submodule_update="" +if($arguments -eq "--no-submodule-update") { + $disable_submodule_update=$true +} + function Start-Progress { param([ScriptBlock]$code) $scroll = "/-\|/-\|" @@ -134,10 +140,14 @@ catch { Write-Host $_.Exception.Message Exit-WithCode 1 } - -Write-Host ">>> " -NoNewLine -ForegroundColor green -Write-Host "Making sure submodules are up-to-date ..." -git submodule update --init --recursive +if (-not $disable_submodule_update) { + Write-Host ">>> " -NoNewLine -ForegroundColor green + Write-Host "Making sure submodules are up-to-date ..." + git submodule update --init --recursive +} else { + Write-Host "*** " -NoNewLine -ForegroundColor yellow + Write-Host "Not updating submodules ..." +} Write-Host ">>> " -NoNewline -ForegroundColor green Write-Host "OpenPype [ " -NoNewline -ForegroundColor white diff --git a/tools/build.sh b/tools/build.sh index 953d51bd81..ccd97ea4c1 100755 --- a/tools/build.sh +++ b/tools/build.sh @@ -57,6 +57,26 @@ BIPurple='\033[1;95m' # Purple BICyan='\033[1;96m' # Cyan BIWhite='\033[1;97m' # White +args=$@ +disable_submodule_update = 0 +while :; do + case $1 in + --no-submodule-update) + disable_submodule_update=1 + ;; + --) + shift + break + ;; + *) + break + esac + + shift +done + + + ############################################################################## # Detect required version of python @@ -172,9 +192,12 @@ main () { . "$openpype_root/tools/create_env.sh" || { echo -e "${BIRed}!!!${RST} Poetry installation failed"; return; } fi +if [ "$disable_submodule_update" == 1 ]; then echo -e "${BIGreen}>>>${RST} Making sure submodules are up-to-date ..." git submodule update --init --recursive - + else + echo -e "${BIYellow}***${RST} Not updating submodules ..." + fi echo -e "${BIGreen}>>>${RST} Building ..." if [[ "$OSTYPE" == "linux-gnu"* ]]; then poetry run python "$openpype_root/setup.py" build > "$openpype_root/build/build.log" || { echo -e "${BIRed}!!!${RST} Build failed, see the build log."; return; }