File tree Expand file tree Collapse file tree 3 files changed +10
-17
lines changed
Expand file tree Collapse file tree 3 files changed +10
-17
lines changed Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ rm -rf ${component_path}/.terraform;
391391
392392# Run global pre.sh
393393if [ -f " pre.sh" ]; then
394- bash pre.sh " ${region} " " ${environment} " " ${action} " \
394+ source pre.sh " ${region} " " ${environment} " " ${action} " \
395395 || error_and_die " Global pre script execution failed with exit code ${?} " ;
396396fi ;
397397
@@ -427,12 +427,10 @@ fi;
427427
428428# Run pre.sh
429429if [ -f " pre.sh" ]; then
430- bash pre.sh " ${region} " " ${environment} " " ${action} " \
430+ source pre.sh " ${region} " " ${environment} " " ${action} " \
431431 || error_and_die " Component pre script execution failed with exit code ${?} " ;
432432fi ;
433433
434- echo " component pre.sh completed"
435-
436434# Pull down secret TFVAR file from S3
437435# Anti-pattern and security warning: This secrets mechanism provides very little additional security.
438436# It permits you to inject secrets directly into terraform without storing them in source control or unencrypted in S3.
Original file line number Diff line number Diff line change 1- #! /usr/bin/env bash
2-
3- set -euo pipefail
4-
51echo " Running app pre.sh"
62
7- cd $( git rev-parse --show-toplevel)
3+ pushd $( git rev-parse --show-toplevel)
84
95make dependencies
106
@@ -13,3 +9,5 @@ npm run generate-dependencies --workspaces --if-present
139npm run lambda-build --workspaces --if-present
1410
1511$( git rev-parse --show-toplevel) /lambdas/layers/pdfjs/build.sh
12+
13+ popd
Original file line number Diff line number Diff line change 1- #! /usr/bin/env bash
2-
3- set -euo pipefail
4-
51REGION=$1
62ENVIRONMENT=$2
73ACTION=$3
84
9- echo " Running pre.sh latest version"
5+ echo " Running pre.sh latestest version"
106echo " REGION=$REGION "
117echo " ENVIRONMENT=$ENVIRONMENT "
128echo " ACTION=$ACTION "
139
10+ pushd $( git rev-parse --show-toplevel)
11+
1412if [ " ${ACTION} " == " apply" ]; then
15- cd $( git rev-parse --show-toplevel)
1613 echo " Building lambdas for distribution"
1714
18- if [[ -z " ${ SKIP_SANDBOX_INSTALL:- } " ]]; then
15+ if [[ -z $ SKIP_SANDBOX_INSTALL ]]; then
1916 echo " Installing dependencies"
2017 make dependencies;
2118 else
3229 echo " Skipping lambda build for action $ACTION "
3330fi
3431
35- exit 0
32+ popd
You can’t perform that action at this time.
0 commit comments