-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathbuildTestOrg.bat
32 lines (28 loc) · 1.44 KB
/
buildTestOrg.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
:: This script creates a long-lived (30 days) scratch org with a relatively large amount of data (~700 donations).
:: This can be helpful when persistent data and large batches is useful for testing.
@echo off
setlocal EnableDelayedExpansion
set orgName=TestData
echo Username for org: %orgName%
:: If namespace was provided as an argument, set this in the project-scratch-def.json
:: and update rules metadata to include the prefix in the sharing reason
set namespace=%1
if not "%namespace%" == "" (
call node scripts/setNamespace.js %namespace%
echo Set namespace in project-scratch-def.json
call node scripts/appendNamespaceToSampleMD.js
echo Appended namespace to custom metadata if required
)
call sf force org create --definitionfile config/project-scratch-def.json --setalias %orgName% --durationdays 30
echo Created org with username %orgName%
call node scripts/appendNamespaceToSampleMD.js
echo Checked for namespace and appended to custom metadata if required
call sf project deploy start --target-org %orgName%
echo Pushed source
call sf org assign permset --name FormulaShare_Admin_User --target-org %orgName%
call sf org assign permset --name FormulaShare_Sample_App_Permissions --target-org %orgName%
echo Assigned permissions
call sf apex run --file config/setDebugModeForUser.apex --target-org %orgName%
echo Set up user for debug mode
call sf apex run --file config/runApexFullTestDataset.apex --target-org %orgName%
echo Created test data