-
Notifications
You must be signed in to change notification settings - Fork 66
/
local-config-template.sh.ejs
87 lines (76 loc) · 4.12 KB
/
local-config-template.sh.ejs
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
#<%%#
####################################################################################################
#
# FILENAME: local-config-template.sh.ejs
#
# PURPOSE: Template for creating a personalized local-config.sh file.
#
# DESCRIPTION: All shell scripts in the dev-tools directory require several configuration values
# to run correctly (eg. the path to your project's root directory or the alias of
# the DevHub that you want to use. These customizations can be specific to each
# individual developer, and therefore should not be tracked by the project's VCS.
#
# This file serves as a template that Release Managers can use to establish baseline
# values for their project. When individaul developers clone the repo and initialize
# their local, personal version of the project this template is used to create a
# customized local-config.sh file at <project-root>/dev-tools/lib/local-config.sh
#
# INSTRUCTIONS: 1. Inside of the dev-tools directory, execute the following command
# cp ./templates/local-config-template.sh.ejs ./lib/local-config.sh
# 2. Edit the default values in your local-config.sh to meet the needs of your local
# environment and project setup.
#
####################################################################################################
#%>
##
###
#### DEFINE LOCAL CONFIGURATION VARIABLES ##########################################################
###
##
#
# Alias for the Dev Hub that should be used when creating scratch orgs for this project.
# This variable will always need to be customized for individual developers.
DEV_HUB_ALIAS="<%%-userAnswers.devHubAlias%>"
# Namespace Prefix. Set to empty string ("") if this project is not building a managed package.
NAMESPACE_PREFIX="<%-userAnswers.namespacePrefix%>"
# Package Name. Specified as part of the Package Detail info in your packaging org.
# Surround this value with double-quotes if your package name contains space characters.
# Set to empty string ("") if this project is not building a managed package.
PACKAGE_NAME="<%-userAnswers.packageName%>"
# Metadata Package ID. Refers to the metadata package as a whole. Must begin with "033".
# Set to empty string ("") if this project is not building a managed package.
METADATA_PACKAGE_ID="<%-userAnswers.metadataPackageId%>"
# Package Version ID. Refers to a specific, installable version of a package. Must begin with "04t".
# Set to empty string ("") if this project is not building a managed package.
PACKAGE_VERSION_ID="<%-userAnswers.packageVersionId%>"
# Default Package Directory. Should match what is set in sfdx-project.json.
DEFAULT_PACKAGE_DIR_NAME="<%-userAnswers.packageDirectory%>"
# Alias for the primary Scratch Org used by this project.
SCRATCH_ORG_ALIAS="$NAMESPACE_PREFIX-SCRATCH"
# Alias for the packaging org for this project.
PACKAGING_ORG_ALIAS="$NAMESPACE_PREFIX-PACKAGE"
# Alias for the subscriber test org used to test managed-beta package installs.
SUBSCRIBER_ORG_ALIAS="$NAMESPACE_PREFIX-SUBSCRIBER"
# Git Remote URI. SSH or HTTPS URI that points to the Git remote repo used by this project.
# GitHub is used as an example here, but any Git remote (ie. BitBucket) can be used.
# Set to empty string ("") if this project is not being tracked in a remote repository.
GIT_REMOTE_URI="<%-userAnswers.gitRemoteUri%>"
# Location of the primary scratch-def.json file that should be used by SFDX-Falcon scripts that
# create scratch orgs (eg. rebuild-scratch-org).
SCRATCH_ORG_CONFIG="$PROJECT_ROOT/config/project-scratch-def.json"
# Echo the variables set by this script prior to exiting. Specify "false" to suppress the
# display of local config that normally occurs when executing SFDX-Falcon based scripts.
ECHO_LOCAL_CONFIG_VARS="true"
#
##
###
#### ECHO ALL VARIABLES ############################################################################
###
##
#
if [ "$ECHO_LOCAL_CONFIG_VARS" = "true" ]; then
echo "\n`tput setaf 7``tput bold`Local configuration variables set by `dirname $0`/lib/local-config.sh`tput sgr0`\n"
echoConfigVariables
fi
##END##