tests: fix shfmt issues
This commit is contained in:
1 parent
3681c17aa2
commit
02a8409114
5 files changed
+13
-14
No files matched your search
@@ -13,7 +13,6 @@ trigger-builder-cnb-builder-build() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
local stack="$(plugn trigger buildpack-stack-name "$APP")"
|
local stack="$(plugn trigger buildpack-stack-name "$APP")"
|
||||||
if [[ -z "$stack" ]]; then
|
if [[ -z "$stack" ]]; then
|
||||||
DOKKU_CNB_STACK="$stack"
|
DOKKU_CNB_STACK="$stack"
|
||||||
@@ -32,7 +31,7 @@ trigger-builder-cnb-builder-build() {
|
|||||||
local TMP_FILE=$(mktemp "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
|
local TMP_FILE=$(mktemp "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
|
||||||
trap "rm -rf '$TMP_FILE' >/dev/null" RETURN INT TERM
|
trap "rm -rf '$TMP_FILE' >/dev/null" RETURN INT TERM
|
||||||
|
|
||||||
config_export app "$APP" --format envfile --merged > "$TMP_FILE"
|
config_export app "$APP" --format envfile --merged >"$TMP_FILE"
|
||||||
|
|
||||||
plugn trigger pre-build-cnb "$APP" "$SOURCECODE_WORK_DIR"
|
plugn trigger pre-build-cnb "$APP" "$SOURCECODE_WORK_DIR"
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ domains_add() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
for DOMAIN in "$@"; do
|
for DOMAIN in "$@"; do
|
||||||
if grep -x --line-regexp --fixed-strings "$DOMAIN" "$APP_VHOST_PATH" 2> /dev/null; then
|
if grep -x --line-regexp --fixed-strings "$DOMAIN" "$APP_VHOST_PATH" 2>/dev/null; then
|
||||||
dokku_log_info1 "Skipping: $DOMAIN already added to $APP"
|
dokku_log_info1 "Skipping: $DOMAIN already added to $APP"
|
||||||
else
|
else
|
||||||
echo "$DOMAIN" >>"$APP_VHOST_PATH"
|
echo "$DOMAIN" >>"$APP_VHOST_PATH"
|
||||||
@@ -149,7 +149,7 @@ domains_add_global() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
for DOMAIN in "$@"; do
|
for DOMAIN in "$@"; do
|
||||||
if grep -q --line-regexp --fixed-strings "$DOMAIN" "$GLOBAL_VHOST_PATH" 2> /dev/null; then
|
if grep -q --line-regexp --fixed-strings "$DOMAIN" "$GLOBAL_VHOST_PATH" 2>/dev/null; then
|
||||||
dokku_log_info1 "Skipping $DOMAIN: already added"
|
dokku_log_info1 "Skipping $DOMAIN: already added"
|
||||||
else
|
else
|
||||||
echo "$DOMAIN" >>"$GLOBAL_VHOST_PATH"
|
echo "$DOMAIN" >>"$GLOBAL_VHOST_PATH"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ cmd-git-allow-host() {
|
|||||||
declare HOST="$1"
|
declare HOST="$1"
|
||||||
[[ -z "$HOST" ]] && dokku_log_fail "Please supply a git host"
|
[[ -z "$HOST" ]] && dokku_log_fail "Please supply a git host"
|
||||||
|
|
||||||
ssh-keyscan -t rsa "$HOST" >> "$DOKKU_ROOT/.ssh/known_hosts"
|
ssh-keyscan -t rsa "$HOST" >>"$DOKKU_ROOT/.ssh/known_hosts"
|
||||||
dokku_log_info1 "$HOST added to known hosts"
|
dokku_log_info1 "$HOST added to known hosts"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,19 +215,19 @@ fn-git-fetch() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
DOKKU_DEPLOY_BRANCH="$(fn-git-deploy-branch "$APP")"
|
DOKKU_DEPLOY_BRANCH="$(fn-git-deploy-branch "$APP")"
|
||||||
if ! git -C "$APP_ROOT" check-ref-format --branch "$DOKKU_DEPLOY_BRANCH" >/dev/null 2>&1; then
|
if ! git -C "$APP_ROOT" check-ref-format --branch "$DOKKU_DEPLOY_BRANCH" >/dev/null 2>&1; then
|
||||||
echo $'\e[1G\e[K'"-----> WARNING: Invalid branch name '$DOKKU_DEPLOY_BRANCH' specified via DOKKU_DEPLOY_BRANCH."
|
echo $'\e[1G\e[K'"-----> WARNING: Invalid branch name '$DOKKU_DEPLOY_BRANCH' specified via DOKKU_DEPLOY_BRANCH."
|
||||||
echo $'\e[1G\e[K'"-----> For more details, please see the man page for 'git-check-ref-format.'"
|
echo $'\e[1G\e[K'"-----> For more details, please see the man page for 'git-check-ref-format.'"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git -C "$APP_ROOT" remote rm remote > /dev/null 2>&1 || true
|
git -C "$APP_ROOT" remote rm remote > /dev/null 2>&1 || true
|
||||||
git -C "$APP_ROOT" remote add --mirror=fetch --no-tags remote "$GIT_REMOTE"
|
git -C "$APP_ROOT" remote add --mirror=fetch --no-tags remote "$GIT_REMOTE"
|
||||||
if [[ -z "$GIT_REF" ]]; then
|
if [[ -z "$GIT_REF" ]]; then
|
||||||
git -C "$APP_ROOT" fetch --update-head-ok remote "$DOKKU_DEPLOY_BRANCH"
|
git -C "$APP_ROOT" fetch --update-head-ok remote "$DOKKU_DEPLOY_BRANCH"
|
||||||
else
|
else
|
||||||
git -C "$APP_ROOT" fetch --update-head-ok remote
|
git -C "$APP_ROOT" fetch --update-head-ok remote
|
||||||
git -C "$APP_ROOT" update-ref "refs/heads/$DOKKU_DEPLOY_BRANCH" "$GIT_REF"
|
git -C "$APP_ROOT" update-ref "refs/heads/$DOKKU_DEPLOY_BRANCH" "$GIT_REF"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -77,7 +77,7 @@ install_dokku() {
|
|||||||
build_dokku
|
build_dokku
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat << EOF | sudo debconf-set-selections
|
cat <<EOF | sudo debconf-set-selections
|
||||||
dokku dokku/hostname string dokku.me
|
dokku dokku/hostname string dokku.me
|
||||||
dokku dokku/key_file string /root/.ssh/id_rsa.pub
|
dokku dokku/key_file string /root/.ssh/id_rsa.pub
|
||||||
dokku dokku/nginx_enable boolean true
|
dokku dokku/nginx_enable boolean true
|
||||||
|
|||||||
@@ -510,14 +510,14 @@ add_release_command() {
|
|||||||
local APP="$1"
|
local APP="$1"
|
||||||
local APP_REPO_DIR="$2"
|
local APP_REPO_DIR="$2"
|
||||||
[[ -z "$APP" ]] && local APP="$TEST_APP"
|
[[ -z "$APP" ]] && local APP="$TEST_APP"
|
||||||
echo "release: touch /app/release.test" >> "$APP_REPO_DIR/Procfile"
|
echo "release: touch /app/release.test" >>"$APP_REPO_DIR/Procfile"
|
||||||
}
|
}
|
||||||
|
|
||||||
add_requirements_txt() {
|
add_requirements_txt() {
|
||||||
local APP="$1"
|
local APP="$1"
|
||||||
local APP_REPO_DIR="$2"
|
local APP_REPO_DIR="$2"
|
||||||
[[ -z "$APP" ]] && local APP="$TEST_APP"
|
[[ -z "$APP" ]] && local APP="$TEST_APP"
|
||||||
echo "flask" >> "$APP_REPO_DIR/requirements.txt"
|
echo "flask" >>"$APP_REPO_DIR/requirements.txt"
|
||||||
}
|
}
|
||||||
|
|
||||||
build_nginx_config() {
|
build_nginx_config() {
|
||||||
|
|||||||
Reference in new issue
Block a user