forked from pozil/sf-docs-to-s3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-dev.bat
45 lines (36 loc) · 954 Bytes
/
install-dev.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@echo OFF
set ORG_ALIAS=s3
@echo:
echo Installing Functions + S3 demo org (%ORG_ALIAS%)
@echo:
rem Install script
echo Cleaning previous scratch org...
cmd.exe /c sfdx force:org:delete -p -u %ORG_ALIAS% 2>NUL
@echo:
echo Creating scratch org...
cmd.exe /c sfdx force:org:create -s -f config/project-scratch-def.json -a %ORG_ALIAS% -d 30
call :checkForError
@echo:
echo Pushing source...
cmd.exe /c sfdx force:source:push -f -u %ORG_ALIAS%
call :checkForError
@echo:
echo Assigning permissions...
cmd.exe /c sfdx force:user:permset:assign -n Functions -u %ORG_ALIAS%
call :checkForError
@echo:
rem Check exit code
@echo:
if ["%errorlevel%"]==["0"] (
echo Installation completed.
@echo:
cmd.exe /c sfdx force:org:open -u %ORG_ALIAS%
)
:: ======== FN ======
GOTO :EOF
rem if the app has failed
:checkForError
if NOT ["%errorlevel%"]==["0"] (
echo Installation failed.
exit /b %errorlevel%
)