From cbad512919f8b3755f4576857d8127f19c08f371 Mon Sep 17 00:00:00 2001 From: jk25084 Date: Tue, 9 Aug 2022 11:57:45 +0800 Subject: [PATCH] Update sfdxdeploytool.bat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a test level option Default. If your package doesn’t contain Apex components, no tests are run. --- sfdxdeploytool.bat | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sfdxdeploytool.bat b/sfdxdeploytool.bat index e1e61c7..a8bb55d 100644 --- a/sfdxdeploytool.bat +++ b/sfdxdeploytool.bat @@ -224,6 +224,10 @@ if "%testLevel%"=="RunSpecifiedTests" ( echo sfdx force:mdapi:deploy -c -f "%zipFolderLocation%/unpackaged.zip" -u %destinationOrgAlias% -w %waitTime% -l RunSpecifiedTests -r %runTests% echo. call sfdx force:mdapi:deploy -c -f "%zipFolderLocation%/unpackaged.zip" -u %destinationOrgAlias% -w %waitTime% -l RunSpecifiedTests -r %runTests% +) else if "%testLevel%"=="Default" ( + echo sfdx force:mdapi:deploy -c -f "%zipFolderLocation%/unpackaged.zip" -u %destinationOrgAlias% -w %waitTime% + echo. + call sfdx force:mdapi:deploy -c -f "%zipFolderLocation%/unpackaged.zip" -u %destinationOrgAlias% -w %waitTime% ) else ( echo sfdx force:mdapi:deploy -c -f "%zipFolderLocation%/unpackaged.zip" -u %destinationOrgAlias% -w %waitTime% -l %testLevel% echo. @@ -251,6 +255,10 @@ if "%testLevel%"=="RunSpecifiedTests" ( echo sfdx force:mdapi:deploy -f "%zipFolderLocation%/unpackaged.zip" -u %destinationOrgAlias% -w %waitTime% -l RunSpecifiedTests -r %runTests% echo. call sfdx force:mdapi:deploy -f "%zipFolderLocation%/unpackaged.zip" -u %destinationOrgAlias% -w %waitTime% -l RunSpecifiedTests -r %runTests% +) else if "%testLevel%"=="Default" ( + echo sfdx force:mdapi:deploy -f "%zipFolderLocation%/unpackaged.zip" -u %destinationOrgAlias% -w %waitTime% + echo. + call sfdx force:mdapi:deploy -f "%zipFolderLocation%/unpackaged.zip" -u %destinationOrgAlias% -w %waitTime% ) else ( echo sfdx force:mdapi:deploy -f "%zipFolderLocation%/unpackaged.zip" -u %destinationOrgAlias% -w %waitTime% -l %testLevel% echo. @@ -278,6 +286,10 @@ if "%testLevel%"=="RunSpecifiedTests" ( echo sfdx force:mdapi:deploy -c -d "%zipFolderLocation%/unpackaged" -u %destinationOrgAlias% -w %waitTime% -l RunSpecifiedTests -r %runTests% echo. call sfdx force:mdapi:deploy -c -d "%zipFolderLocation%/unpackaged" -u %destinationOrgAlias% -w %waitTime% -l RunSpecifiedTests -r %runTests% +) else if "%testLevel%"=="Default" ( + echo sfdx force:mdapi:deploy -c -d "%zipFolderLocation%/unpackaged" -u %destinationOrgAlias% -w %waitTime% + echo. + call sfdx force:mdapi:deploy -c -d "%zipFolderLocation%/unpackaged" -u %destinationOrgAlias% -w %waitTime% ) else ( echo sfdx force:mdapi:deploy -c -d "%zipFolderLocation%/unpackaged" -u %destinationOrgAlias% -w %waitTime% -l %testLevel% echo. @@ -305,6 +317,10 @@ if "%testLevel%"=="RunSpecifiedTests" ( echo sfdx force:mdapi:deploy -d "%zipFolderLocation%/unpackaged" -u %destinationOrgAlias% -w %waitTime% -l RunSpecifiedTests -r %runTests% echo. call sfdx force:mdapi:deploy -d "%zipFolderLocation%/unpackaged" -u %destinationOrgAlias% -w %waitTime% -l RunSpecifiedTests -r %runTests% +) else if "%testLevel%"=="Default" ( + echo sfdx force:mdapi:deploy -d "%zipFolderLocation%/unpackaged" -u %destinationOrgAlias% -w %waitTime% + echo. + call sfdx force:mdapi:deploy -d "%zipFolderLocation%/unpackaged" -u %destinationOrgAlias% -w %waitTime% ) else ( echo sfdx force:mdapi:deploy -d "%zipFolderLocation%/unpackaged" -u %destinationOrgAlias% -w %waitTime% -l %testLevel% echo.