This repository was archived by the owner on Jul 5, 2024. It is now read-only.
forked from forcedotcom/quiz-host-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-dev.bat
More file actions
67 lines (56 loc) · 1.4 KB
/
Copy pathinstall-dev.bat
File metadata and controls
67 lines (56 loc) · 1.4 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@echo OFF
rem set parameters
if [%1]==[] (
set ORG_ALIAS=quiz
) else (
set ORG_ALIAS=%1
)
if [%2]==[] (
set DATA=sample
) else (
set DATA=%2
)
@echo:
echo Installing Quiz org:
echo - Org alias: %ORG_ALIAS%
echo - Data: %DATA%
@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 -c -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 Quiz_Host -u %ORG_ALIAS%
call :checkForError
@echo:
echo Importing data...
cmd.exe /c sfdx force:data:tree:import -p data/%DATA%/plan.json -u %ORG_ALIAS%
call :checkForError
@echo:
echo Generating user password...
cmd.exe /c sfdx force:user:password:generate -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 -p /lightning/setup/SecurityremoteProxy/home -u %ORG_ALIAS%
)
:: ======== FN ======
GOTO :EOF
rem if the app has failed
:checkForError
if NOT ["%errorlevel%"]==["0"] (
echo Installation failed.
exit /b %errorlevel%
)