File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,13 @@ magenta='\033[0;35m'
1111reset=' \033[0m' # reset style
1212
1313deploy_command=" serverless deploy $@ --verbose"
14+ if command -v npx & > /dev/null; then
15+ deploy_command=" npx $deploy_command "
16+ elif ! command -v serverless & > /dev/null; then
17+ printf " ${red} Serverless is not installed.${reset} \n\n"
18+ printf " Please run ${blue_bold} npm install --save-dev${reset} first and try again.\n"
19+ exit 1
20+ fi
1421
1522printf " [1/4] ${blue} Deploying the core stack...${reset} \n"
1623(cd core && $deploy_command )
@@ -20,6 +27,7 @@ printf "[2/4] ${blue}Deploying collectors and analyzers...${reset}\n"
2027num_collectors_being_deployed=0
2128# Deploy the stacks which have an environment file:
2229if [[ -f credentials/analyzers.env ]]; then
30+ printf " ${blue} Deploying the analyzers...${reset} \n"
2331 (cd analyzers && $deploy_command )&
2432else
2533 printf " [x] ${red} Unable to deploy the analyzers - environment file does not exist${reset} \n"
You can’t perform that action at this time.
0 commit comments