Skip to content

Commit 94d7221

Browse files
authored
Update master_deploy.sh
1 parent 8eb3bd3 commit 94d7221

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

master_deploy.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ CFCACHE="true"
6161

6262
#variable for Lambda
6363
AWS_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"
742751
fi
743752
}
744753

0 commit comments

Comments
 (0)