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

[#768] Added checking for bin existence in scripts. #1271

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions scripts/drevops/deploy-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

#shellcheck disable=SC2043
for cmd in docker; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 46 in scripts/drevops/deploy-docker.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/deploy-docker.sh#L44-L46

Added lines #L44 - L46 were not covered by tests

info "Started DOCKER deployment."

# Only deploy if the map was provided, but do not fail if it has not as this
Expand Down
5 changes: 5 additions & 0 deletions scripts/drevops/deploy-lagoon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@
export PATH="${PATH}:${DREVOPS_LAGOONCLI_PATH}"
fi

for cmd in lagoon curl; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 108 in scripts/drevops/deploy-lagoon.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/deploy-lagoon.sh#L106-L108

Added lines #L106 - L108 were not covered by tests

note "Configuring Lagoon instance."
#shellcheck disable=SC2218
lagoon config add --force -l "${DREVOPS_DEPLOY_LAGOON_INSTANCE}" -g "${DREVOPS_DEPLOY_LAGOON_INSTANCE_GRAPHQL}" -H "${DREVOPS_DEPLOY_LAGOON_INSTANCE_HOSTNAME}" -P "${DREVOPS_DEPLOY_LAGOON_INSTANCE_PORT}"
Expand Down
6 changes: 6 additions & 0 deletions scripts/drevops/deploy-webhook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

#shellcheck disable=SC2043
for cmd in curl; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 38 in scripts/drevops/deploy-webhook.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/deploy-webhook.sh#L36-L38

Added lines #L36 - L38 were not covered by tests

info "Started WEBHOOK deployment."

# Check all required values.
Expand Down
5 changes: 5 additions & 0 deletions scripts/drevops/doctor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
warn() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[33m[WARN] %s\033[0m\n" "${1}" || printf "[WARN] %s\n" "${1}"; }
# @formatter:on

for cmd in docker pygmy ahoy; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 78 in scripts/drevops/doctor.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/doctor.sh#L76-L78

Added lines #L76 - L78 were not covered by tests

#
# Main entry point.
#
Expand Down
5 changes: 5 additions & 0 deletions scripts/drevops/download-db-acquia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

for cmd in php curl gunzip; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 61 in scripts/drevops/download-db-acquia.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/download-db-acquia.sh#L58-L61

Added lines #L58 - L61 were not covered by tests

info "Started database dump download from Acquia."

#
Expand Down
6 changes: 6 additions & 0 deletions scripts/drevops/download-db-curl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

#shellcheck disable=SC2043
for cmd in curl; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 37 in scripts/drevops/download-db-curl.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/download-db-curl.sh#L35-L37

Added lines #L35 - L37 were not covered by tests

info "Started database dump download from CURL."

# Check all required values.
Expand Down
6 changes: 6 additions & 0 deletions scripts/drevops/download-db-docker-registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

#shellcheck disable=SC2043
for cmd in docker; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 40 in scripts/drevops/download-db-docker-registry.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/download-db-docker-registry.sh#L37-L40

Added lines #L37 - L40 were not covered by tests

info "Started Docker data image download."

[ -z "${DOCKER_USER}" ] && fail "Missing required value for DOCKER_USER." && exit 1
Expand Down
6 changes: 6 additions & 0 deletions scripts/drevops/download-db-ftp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

#shellcheck disable=SC2043
for cmd in curl; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 48 in scripts/drevops/download-db-ftp.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/download-db-ftp.sh#L45-L48

Added lines #L45 - L48 were not covered by tests

# Check all required values.
[ -z "${DREVOPS_DB_DOWNLOAD_FTP_USER}" ] && fail "Missing required value for DREVOPS_DB_DOWNLOAD_FTP_USER." && exit 1
[ -z "${DREVOPS_DB_DOWNLOAD_FTP_PASS}" ] && fail "Missing required value for DREVOPS_DB_DOWNLOAD_FTP_PASS." && exit 1
Expand Down
5 changes: 5 additions & 0 deletions scripts/drevops/download-db-lagoon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

for cmd in ssh rsync; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 82 in scripts/drevops/download-db-lagoon.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/download-db-lagoon.sh#L79-L82

Added lines #L79 - L82 were not covered by tests

info "Started database dump download from Lagoon."

mkdir -p "${DREVOPS_DB_DIR}"
Expand Down
6 changes: 6 additions & 0 deletions scripts/drevops/export-db-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

#shellcheck disable=SC2043
for cmd in docker; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 40 in scripts/drevops/export-db-docker.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/export-db-docker.sh#L38-L40

Added lines #L38 - L40 were not covered by tests

info "Started Docker database image export."

[ -z "${DREVOPS_DB_EXPORT_DOCKER_IMAGE}" ] && fail "Destination image name is not specified. Please provide docker image as a variable DREVOPS_DB_EXPORT_DOCKER_IMAGE in a format <org>/<repository>." && exit 1
Expand Down
6 changes: 6 additions & 0 deletions scripts/drevops/export-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

#shellcheck disable=SC2043
for cmd in docker; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 32 in scripts/drevops/export-db.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/export-db.sh#L30-L32

Added lines #L30 - L32 were not covered by tests

info "Started database export."

if [ -z "${DREVOPS_DB_DOCKER_IMAGE}" ]; then
Expand Down
6 changes: 6 additions & 0 deletions scripts/drevops/github-labels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

#shellcheck disable=SC2043
for cmd in curl; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 42 in scripts/drevops/github-labels.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/github-labels.sh#L40-L42

Added lines #L40 - L42 were not covered by tests

# Array of labels to create. If DELETE_EXISTING_LABELS=1, the labels list will
# be exactly as below, otherwise labels below will be added to existing ones.
labels=(
Expand Down
6 changes: 6 additions & 0 deletions scripts/drevops/login-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

#shellcheck disable=SC2043
for cmd in docker; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 36 in scripts/drevops/login-docker.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/login-docker.sh#L33-L36

Added lines #L33 - L36 were not covered by tests

# Check all required values.
[ -z "${DOCKER_REGISTRY}" ] && echo "Missing required value for DOCKER_REGISTRY." && exit 1

Expand Down
5 changes: 5 additions & 0 deletions scripts/drevops/mirror-code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

for cmd in git rsync; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 50 in scripts/drevops/mirror-code.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/mirror-code.sh#L47-L50

Added lines #L47 - L50 were not covered by tests

info "Started code mirroring."

# Check all required values.
Expand Down
6 changes: 5 additions & 1 deletion scripts/drevops/notify-github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

command -v curl >/dev/null || (fail "curl command is not available." && exit 1)
for cmd in php curl; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 49 in scripts/drevops/notify-github.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/notify-github.sh#L47-L49

Added lines #L47 - L49 were not covered by tests

[ -z "${DREVOPS_NOTIFY_GITHUB_TOKEN}" ] && fail "Missing required value for DREVOPS_NOTIFY_GITHUB_TOKEN" && exit 1
[ -z "${DREVOPS_NOTIFY_REPOSITORY}" ] && fail "Missing required value for DREVOPS_NOTIFY_REPOSITORY" && exit 1
[ -z "${DREVOPS_NOTIFY_REF}" ] && fail "Missing required value for DREVOPS_NOTIFY_REF" && exit 1
Expand Down
6 changes: 5 additions & 1 deletion scripts/drevops/notify-jira.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

command -v curl >/dev/null || (fail "curl command is not available." && exit 1)
for cmd in php curl; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 59 in scripts/drevops/notify-jira.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/notify-jira.sh#L57-L59

Added lines #L57 - L59 were not covered by tests

[ -z "${DREVOPS_NOTIFY_JIRA_USER}" ] && fail "Missing required value for DREVOPS_NOTIFY_JIRA_USER" && exit 1
[ -z "${DREVOPS_NOTIFY_JIRA_TOKEN}" ] && fail "Missing required value for DREVOPS_NOTIFY_JIRA_TOKEN" && exit 1
[ -z "${DREVOPS_NOTIFY_BRANCH}" ] && fail "Missing required value for DREVOPS_NOTIFY_BRANCH" && exit 1
Expand Down
7 changes: 6 additions & 1 deletion scripts/drevops/notify-newrelic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

command -v curl >/dev/null || (fail "curl command is not available." && exit 1)
#shellcheck disable=SC2043
for cmd in curl; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 59 in scripts/drevops/notify-newrelic.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/notify-newrelic.sh#L57-L59

Added lines #L57 - L59 were not covered by tests

[ -z "${DREVOPS_NOTIFY_NEWRELIC_PROJECT}" ] && fail "Missing required value for DREVOPS_NOTIFY_NEWRELIC_PROJECT" && exit 1
[ -z "${DREVOPS_NOTIFY_NEWRELIC_APIKEY}" ] && fail "Missing required value for DREVOPS_NOTIFY_NEWRELIC_APIKEY" && exit 1
[ -z "${DREVOPS_NOTIFY_NEWRELIC_REF}" ] && fail "Missing required value for DREVOPS_NOTIFY_NEWRELIC_REF" && exit 1
Expand Down
6 changes: 6 additions & 0 deletions scripts/drevops/reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

#shellcheck disable=SC2043
for cmd in git; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 25 in scripts/drevops/reset.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/reset.sh#L23-L25

Added lines #L23 - L25 were not covered by tests

is_hard_reset="$([ "${1:-}" == "hard" ] && echo "1" || echo "0")"

info "Started reset."
Expand Down
5 changes: 5 additions & 0 deletions scripts/drevops/setup-ssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

for cmd in ssh-keygen ssh-add; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 39 in scripts/drevops/setup-ssh.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/setup-ssh.sh#L37-L39

Added lines #L37 - L39 were not covered by tests

info "Started SSH setup."

fingerprint_var="DREVOPS_${DREVOPS_SSH_PREFIX}_SSH_FINGERPRINT"
Expand Down
6 changes: 5 additions & 1 deletion scripts/drevops/task-copy-db-acquia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@
}

# Pre-flight checks.
command -v curl >/dev/null || (fail "curl command is not available." && exit 1)
#shellcheck disable=SC2043
for cmd in curl; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 78 in scripts/drevops/task-copy-db-acquia.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/task-copy-db-acquia.sh#L75-L78

Added lines #L75 - L78 were not covered by tests

# Check that all required variables are present.
[ -z "${DREVOPS_ACQUIA_KEY}" ] && fail "Missing value for DREVOPS_ACQUIA_KEY." && exit 1
Expand Down
9 changes: 6 additions & 3 deletions scripts/drevops/task-copy-files-acquia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

# Pre-flight checks.
for cmd in php curl; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 56 in scripts/drevops/task-copy-files-acquia.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/task-copy-files-acquia.sh#L53-L56

Added lines #L53 - L56 were not covered by tests

info "Started database copying between environments in Acquia."

#
Expand All @@ -67,9 +73,6 @@
php -r "\$data=json_decode(file_get_contents('php://stdin'), TRUE); isset(\$data[\"${key}\"]) ? print trim(json_encode(\$data[\"${key}\"], JSON_UNESCAPED_SLASHES), '\"') : exit(1);"
}

# Pre-flight checks.
command -v curl >/dev/null || (fail "curl command is not available." && exit 1)

# Check that all required variables are present.
[ -z "${DREVOPS_ACQUIA_KEY}" ] && fail "Missing value for DREVOPS_ACQUIA_KEY." && exit 1
[ -z "${DREVOPS_ACQUIA_SECRET}" ] && fail "Missing value for DREVOPS_ACQUIA_SECRET." && exit 1
Expand Down
5 changes: 5 additions & 0 deletions scripts/drevops/task-custom-lagoon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@
export PATH="${PATH}:${DREVOPS_LAGOONCLI_PATH}"
fi

for cmd in curl lagoon; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 92 in scripts/drevops/task-custom-lagoon.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/task-custom-lagoon.sh#L89-L92

Added lines #L89 - L92 were not covered by tests

note "Configuring Lagoon instance."
#shellcheck disable=SC2218
lagoon config add --force -l "${DREVOPS_TASK_LAGOON_INSTANCE}" -g "${DREVOPS_TASK_LAGOON_INSTANCE_GRAPHQL}" -H "${DREVOPS_TASK_LAGOON_INSTANCE_HOSTNAME}" -P "${DREVOPS_TASK_LAGOON_INSTANCE_PORT}"
Expand Down
9 changes: 6 additions & 3 deletions scripts/drevops/task-purge-cache-acquia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
fail() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\033[31m[FAIL] %s\033[0m\n" "${1}" || printf "[FAIL] %s\n" "${1}"; }
# @formatter:on

# Pre-flight checks.
for cmd in php curl; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 56 in scripts/drevops/task-purge-cache-acquia.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/task-purge-cache-acquia.sh#L53-L56

Added lines #L53 - L56 were not covered by tests

info "Started cache purging in Acquia."

#
Expand All @@ -67,9 +73,6 @@
php -r "\$data=json_decode(file_get_contents('php://stdin'), TRUE); isset(\$data[\"${key}\"]) ? print trim(json_encode(\$data[\"${key}\"], JSON_UNESCAPED_SLASHES), '\"') : exit(1);"
}

# Pre-flight checks.
command -v curl >/dev/null || (fail "curl command is not available." && exit 1)

# Check that all required variables are present.
[ -z "${DREVOPS_ACQUIA_KEY}" ] && fail "Missing value for DREVOPS_ACQUIA_KEY." && exit 1
[ -z "${DREVOPS_ACQUIA_SECRET}" ] && fail "Missing value for DREVOPS_ACQUIA_SECRET." && exit 1
Expand Down
5 changes: 5 additions & 0 deletions scripts/drevops/update-scaffold.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
export DREVOPS_INSTALLER_URL
export DREVOPS_INSTALL_COMMIT

for cmd in php curl; do command -v ${cmd} >/dev/null || {
fail "Command ${cmd} is not available"
exit 1
}; done

Check warning on line 30 in scripts/drevops/update-scaffold.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/update-scaffold.sh#L28-L30

Added lines #L28 - L30 were not covered by tests

curl -L "${DREVOPS_INSTALLER_URL}"?"$(date +%s)" >/tmp/install
php /tmp/install --quiet
rm /tmp/install >/dev/null
Loading