File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ CFCACHE="true"
6161
6262# variable for Lambda
6363AWS_LAMBDA_DEPLOY_TYPE=" "
64+ AWS_LAMBDA_STAGE=" "
6465
6566# FUNCTIONS
6667# usage Function - provides information like how to execute the script
@@ -542,9 +543,9 @@ configure_Lambda_template()
542543 do
543544 o=$IFS
544545 IFS=$( echo -en " \n\b" )
545- envvars=$( cat $listname .json | jq -c ' .app_var ' )
546- echo " $envvars " > /home/circleci/project/config/dev .json
547- sed -i ' s/\\n/\\\\n/g' /home/circleci/project/config/dev .json
546+ envvars=$( cat $listname .json | jq -c ' .app_var ' )
547+ echo " $envvars " > /home/circleci/project/config/$AWS_LAMBDA_STAGE .json
548+ sed -i ' s/\\n/\\\\n/g' /home/circleci/project/config/$AWS_LAMBDA_STAGE .json
548549 # yq r $listname.json >$listname.yml
549550 # a=serverless.yml
550551 # b="$listname.json"
@@ -739,6 +740,14 @@ then
739740 exit 1
740741 fi
741742 log " AWS_LAMBDA_DEPLOY_TYPE : $AWS_LAMBDA_DEPLOY_TYPE "
743+
744+ if [ -z $AWS_LAMBDA_STAGE ] ;
745+ then
746+ log " Build varibale are not updated. Please update the Build variable file"
747+ usage
748+ exit 1
749+ fi
750+ log " AWS_LAMBDA_STAGE : $AWS_LAMBDA_STAGE "
742751fi
743752}
744753
You can’t perform that action at this time.
0 commit comments