Skip to content

Commit d389b9a

Browse files
authored
Merge pull request #2 from wadewegner/v3
Updates for V3
2 parents e6eb4fe + f45fcce commit d389b9a

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

bin/compile

+17-4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ set -o pipefail # don't ignore exit codes when piping output
99
unset GIT_DIR # Avoid GIT_DIR leak from previous build steps
1010

1111
### Configure directories
12+
1213
BUILD_DIR=${1:-}
1314
CACHE_DIR=${2:-}
1415
ENV_DIR=${3:-}
@@ -34,8 +35,17 @@ install_sfdx_cli() {
3435
chmod -R 755 "$BUILD_DIR/vendor/sfdx/cli"
3536
}
3637

38+
install_jq() {
39+
log "Downloading jq ..."
40+
mkdir -p "$BUILD_DIR/vendor/sfdx/jq"
41+
cd "$BUILD_DIR/vendor/sfdx/jq"
42+
wget --quiet -O jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
43+
chmod +x jq
44+
}
45+
3746
setup_dirs() {
3847
export PATH="$BUILD_DIR/vendor/sfdx/cli/bin:$PATH"
48+
export PATH="$BUILD_DIR/vendor/sfdx/jq:$PATH"
3949
}
4050

4151
header 'Welcome to salesforce-cli-buildpack!'
@@ -49,14 +59,17 @@ debug "CACHE_DIR: $CACHE_DIR"
4959
debug "ENV_DIR: $ENV_DIR"
5060
debug "BP_DIR: $BP_DIR"
5161

52-
setup_dirs "$BUILD_DIR"
62+
setup_dirs
5363
log "Starting CLI installation ..."
54-
install_sfdx_cli "$BUILD_DIR"
64+
install_sfdx_cli
65+
66+
log "Starting jq installation ..."
67+
install_jq
5568

56-
# Create vendor folder
69+
# Create .profile.d folder
5770
mkdir -p $BUILD_DIR/.profile.d
5871

59-
# if no .profile, create one
72+
# if no .profile.d/path.sh, create one
6073
if [ ! -f $BUILD_DIR/.profile.d/path.sh ]; then
6174
log "Creating path.sh ..."
6275
echo "echo \"Updating PATH to include Salesforce CLI ...\"

0 commit comments

Comments
 (0)