Ensure all helper scripts pushd/popd

Make sure all of these move to the root of the repository first, then
return to where they were afterwards, using pushd/popd. This allows them
to be executed from anywhere in the repo.
This commit is contained in:
2021-11-06 03:16:02 -04:00
parent b9c30baf80
commit ac885b855a
8 changed files with 29 additions and 4 deletions

View File

@ -27,6 +27,9 @@ fi
HOSTS=( ${@} )
echo "> Deploying to host(s): ${HOSTS[@]}"
# Move to repo root if we're not
pushd $( git rev-parse --show-toplevel ) &>/dev/null
# Prepare code
echo "Preparing code (format and lint)..."
./prepare || exit
@ -64,3 +67,5 @@ done
if [[ -z ${KEEP_ARTIFACTS} ]]; then
rm ../pvc*_${version}*
fi
popd &>/dev/null