This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
@echo OFF | ||
cd %CD%/.. | ||
|
||
rem Set parameters | ||
set ORG_ALIAS=dw-recipes | ||
|
||
@echo: | ||
echo Installing DataWeave Apex Recipes scratch org (%ORG_ALIAS%) | ||
@echo: | ||
|
||
rem Install script | ||
echo Cleaning previous scratch org... | ||
cmd.exe /c sf org delete scratch -p -o %ORG_ALIAS% 2>NUL | ||
@echo: | ||
|
||
echo Creating scratch org... | ||
cmd.exe /c sf org create scratch -f config/project-scratch-def.json -a %ORG_ALIAS% -d -y 30 | ||
call :checkForError | ||
@echo: | ||
|
||
echo Pushing source... | ||
cmd.exe /c sf project deploy start | ||
call :checkForError | ||
@echo: | ||
|
||
rem Report install success if no error | ||
@echo: | ||
if ["%errorlevel%"]==["0"] ( | ||
echo Installation completed. | ||
) | ||
|
||
:: ======== FN ====== | ||
GOTO :EOF | ||
|
||
rem Display error if the install has failed | ||
:checkForError | ||
if NOT ["%errorlevel%"]==["0"] ( | ||
echo Installation failed. | ||
exit /b %errorlevel% | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) | ||
cd $SCRIPT_PATH/.. | ||
|
||
# Set parameters | ||
ORG_ALIAS="dw-recipes" | ||
|
||
echo "" | ||
echo "Installing DataWeave Apex Recipes scratch org ($ORG_ALIAS)" | ||
echo "" | ||
|
||
# Install script | ||
echo "Cleaning previous scratch org..." | ||
sf org delete scratch -p -o $ORG_ALIAS &> /dev/null | ||
echo "" | ||
|
||
echo "Creating scratch org..." && \ | ||
sf org create scratch -f config/project-scratch-def.json -a $ORG_ALIAS -d -y 30 && \ | ||
echo "" && \ | ||
|
||
echo "Pushing source..." && \ | ||
sf project deploy start && \ | ||
echo "" | ||
|
||
EXIT_CODE="$?" | ||
echo "" | ||
|
||
# Check exit code | ||
echo "" | ||
if [ "$EXIT_CODE" -eq 0 ]; then | ||
echo "Installation completed." | ||
else | ||
echo "Installation failed." | ||
fi | ||
exit $EXIT_CODE |