Skip to content

Instantly share code, notes, and snippets.

@niradler
Created June 30, 2019 23:04
Show Gist options
  • Save niradler/0b00e10cd1feb9bcc4d36da73646cf6c to your computer and use it in GitHub Desktop.
Save niradler/0b00e10cd1feb9bcc4d36da73646cf6c to your computer and use it in GitHub Desktop.
#!/bin/bash
# configure env variable STAGE, OLDPWD
# run command in each folder
set -e
for path in $(ls projects); do
if [[ -d "projects/$path" ]]
then
echo "deploying $path"
cd "projects/$path"
npm install
npm run deploy -- -s $STAGE --conceal
cd $OLDPWD
else
continue
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment