Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure BEFORE_SCRIPT and AFTER_SCRIPT are populated correctly #123

Merged
merged 2 commits into from
Aug 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,10 @@ if [[ "${PHP}" == "" ]];then
fi

declare -a BEFORE_SCRIPT=()
BEFORE_SCRIPT_STRING="$(echo "${JOB}" | jq -rc '(.before_script // [])[]' | tr -d '\n')"
if [[ "${BEFORE_SCRIPT_STRING}" != "" ]]; then
readarray -t BEFORE_SCRIPT="${BEFORE_SCRIPT_STRING}"
fi
readarray -t BEFORE_SCRIPT < <(echo "${JOB}" | jq -rc '(.before_script // [])[]' )

declare -a AFTER_SCRIPT=()
AFTER_SCRIPT_STRING="$(echo "${JOB}" | jq -rc '(.after_script // [])[]' | tr -d '\n')"
if [[ "${AFTER_SCRIPT_STRING}" != "" ]]; then
readarray -t AFTER_SCRIPT="${AFTER_SCRIPT_STRING}"
fi
readarray -t AFTER_SCRIPT < <(echo "${JOB}" | jq -rc '(.after_script // [])[]' )


echo "Marking PHP ${PHP} as configured default"
Expand Down