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:
@ -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
|
||||
|
Reference in New Issue
Block a user