-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackaging.sh
47 lines (39 loc) · 1.63 KB
/
packaging.sh
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
# 1. Create DE org where you'll define the namespace
# 2. Create DE org and enable DevHub
# 3. Login to the DevHub org -> Go to the App Launcher -> Select Namespace Registries
# 4. Click on the "Link Namespace" button to link your namespace org
# Creating a 2GP pack
sfdx force:package:create --name myPckgName --description "My Package" --packagetype Managed --path force-app --targetdevhubusername devHubOrg
: '
{
"packageDirectories": [
{
"path": "force-app",
"default": true,
"package": "myPckgName",
"versionName": "ver 0.1",
"versionNumber": "0.1.0.NEXT"
}
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "56.0",
"packageAliases": {
"myPckgName": "0Hoxxx"
}
}
'
# List all the packages associated with your DevHub
sfdx force:package:list
# Create the Package Version
# 1. In sfdx-project.json change the versionName to Version 1.0
# 2. In sfdx-project.json change the versionNumber to 1.0.0.NEXT
# 3. In the force-app directory, create the package version
# Create the Package Version
sfdx force:package:version:create -p myPckgName -d force-app -k test1234 --wait 10 -v devHubOrg
# Use the package version alias to install the package version in the scratch org
sfdx force:package:install --wait 10 --publishwait 10 --package [email protected] -k test1234 -r -u MyScratchOrgAlias
# open scratch org and test it
sfdx force:org:open -u MyScratchOrgAlias
# Release the Package Version
sfdx force:package:version:promote -p [email protected] -v devHubOrg