Skip to content

Commit

Permalink
No need check some defaut commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
tannguyen04 committed Apr 17, 2024
1 parent 404e9ba commit 2bce679
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion scripts/drevops/deploy-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pass() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\03
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 docker >/dev/null || (fail "docker command is not available." && exit 1)
command -v docker >/dev/null || (fail "Command docker is not available." && exit 1)

info "Started DOCKER deployment."

Expand Down
2 changes: 0 additions & 2 deletions scripts/drevops/download-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ pass() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\03
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 find >/dev/null || (fail "Command find is not available." && exit 1)

info "Started database download."

[ "${DREVOPS_DB_DOWNLOAD_PROCEED}" != "1" ] && pass "Skipping database download as DB_DOWNLOAD_PROCEED is not set to 1." && exit 0
Expand Down
4 changes: 1 addition & 3 deletions scripts/drevops/github-labels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ pass() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\03
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 curl sed awk; do
command -v ${cmd} >/dev/null || { fail "Command ${cmd} is not available"; exit 1; };
done
command -v curl >/dev/null || { fail "Command curl is not available"; exit 1; };

# 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.
Expand Down
2 changes: 1 addition & 1 deletion scripts/drevops/mirror-code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pass() { [ "${TERM:-}" != "dumb" ] && tput colors >/dev/null 2>&1 && printf "\03
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 pushd popd; do
for cmd in git rsync; do
command -v ${cmd} >/dev/null || { fail "Command ${cmd} is not available"; exit 1; };
done

Expand Down

1 comment on commit 2bce679

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.