Skip to content

Commit

Permalink
feat: allow passing env when deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaaz committed Nov 5, 2023
1 parent 1e6df4c commit 74f5f37
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ PACKAGE_NAME=$(basename "$PACKAGE_ROOT")
echo "Executing [deploy] for \"$PACKAGE_NAME\". Path: $PACKAGE_ROOT"

platforms=""
env="production"

while [ $# -gt 0 ]; do
case "$1" in
--env)
env="$2"
shift 2
;;
--platforms)
platforms="$2"
shift 2
Expand All @@ -34,7 +39,7 @@ if [ -n "$platforms" ]; then
for platform in ${platforms//,/ }; do
set -x

helm upgrade --install $PACKAGE_NAME-$platform owlebot/App --set app.platform=$platform -f $PACKAGE_ROOT/k8s/helm.yaml
helm upgrade --install $PACKAGE_NAME-$platform owlebot/App --set app.nodeEnv=$env --set app.platform=$platform -f $PACKAGE_ROOT/k8s/helm.yaml

set +x
done
Expand All @@ -44,7 +49,7 @@ else

set -x

helm upgrade --install $PACKAGE_NAME owlebot/App -f $PACKAGE_ROOT/k8s/helm.yaml
helm upgrade --install $PACKAGE_NAME owlebot/App --set app.nodeEnv=$env -f $PACKAGE_ROOT/k8s/helm.yaml

set +x
fi

0 comments on commit 74f5f37

Please sign in to comment.