Skip to content

Commit

Permalink
forecasts is no longer a required arg
Browse files Browse the repository at this point in the history
  • Loading branch information
zkamvar committed Dec 4, 2024
1 parent f9ccc07 commit 0d52d75
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion render.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ORG=${1:-""}
REPO=${2:-""}
BRANCH=${3:-"ptc/data"}
DIR=${4:-""}
FORECASTS=${5:-"true"}
FORECASTS=${5:-""}
if [[ $ORG == "hubverse-org" && $REPO == "hub-dashboard-predtimechart" ]]; then
DIR="demo/"
fi
Expand All @@ -16,6 +16,16 @@ if [[ -z $ORG && -z $REPO ]]; then
REPO=${full#*/} # bash expansion: delete shortest match before '/'
REPO=${REPO%/*} # bash expansion: delete shortest match after '/'
fi
if [[ -z "${FORECASTS}" && -e "predtimechart-config.yml" ]]; then
# If the forecasts are not specified, we check for the existence of the
# predtimechart-config.yml and set it to TRUE if it does exist
FORECASTS="true"
else
# if either of these is not true, then we take the value of forecasts,
# but default to false because that means that predtimechart-config
# does not exist
FORECASTS=${FORECASTS:-"false"}
fi
ROOT="https://raw.githubusercontent.com/$ORG/$REPO/refs/heads/$BRANCH/$DIR"

# copy resources to the user's site
Expand Down

0 comments on commit 0d52d75

Please sign in to comment.