mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
Merge pull request #72955 from BenTheElder/fixup-sh
make more of the shell pass lints
This commit is contained in:
commit
49c83902d2
@ -45,7 +45,7 @@ mkdir -p "${CONFDIR}"
|
|||||||
if [[ -f "${PIDFILE}" ]]; then
|
if [[ -f "${PIDFILE}" ]]; then
|
||||||
PID=$(cat "${PIDFILE}")
|
PID=$(cat "${PIDFILE}")
|
||||||
echo "Cleaning up old PID file: ${PIDFILE}"
|
echo "Cleaning up old PID file: ${PIDFILE}"
|
||||||
kill $PID &> /dev/null || true
|
kill "${PID}" &> /dev/null || true
|
||||||
rm "${PIDFILE}"
|
rm "${PIDFILE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ set -o errexit
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
source "${KUBE_ROOT}/build/common.sh"
|
source "${KUBE_ROOT}/build/common.sh"
|
||||||
|
|
||||||
kube::build::verify_prereqs
|
kube::build::verify_prereqs
|
||||||
|
@ -24,7 +24,7 @@ set -o errexit
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
KUBE_ROOT="$(dirname "${BASH_SOURCE}")/.."
|
KUBE_ROOT="$(dirname "${BASH_SOURCE[0]}")/.."
|
||||||
source "${KUBE_ROOT}/build/common.sh"
|
source "${KUBE_ROOT}/build/common.sh"
|
||||||
|
|
||||||
kube::build::verify_prereqs
|
kube::build::verify_prereqs
|
||||||
|
@ -19,7 +19,7 @@ set -o errexit
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
source "${KUBE_ROOT}/build/common.sh"
|
source "${KUBE_ROOT}/build/common.sh"
|
||||||
|
|
||||||
kube::build::verify_prereqs false
|
kube::build::verify_prereqs false
|
||||||
|
@ -18,7 +18,7 @@ set -o nounset
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
# Complete the release with the standard env
|
# Complete the release with the standard env
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
source "${KUBE_ROOT}/build/common.sh"
|
source "${KUBE_ROOT}/build/common.sh"
|
||||||
source "${KUBE_ROOT}/build/lib/release.sh"
|
source "${KUBE_ROOT}/build/lib/release.sh"
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ set -o errexit
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
source "${KUBE_ROOT}/build/common.sh"
|
source "${KUBE_ROOT}/build/common.sh"
|
||||||
source "${KUBE_ROOT}/build/lib/release.sh"
|
source "${KUBE_ROOT}/build/lib/release.sh"
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ set -o nounset
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
# Complete the release with the standard env
|
# Complete the release with the standard env
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
|
|
||||||
# Check and error if not "in-a-container"
|
# Check and error if not "in-a-container"
|
||||||
if [[ ! -f /.dockerenv ]]; then
|
if [[ ! -f /.dockerenv ]]; then
|
||||||
@ -46,4 +46,4 @@ if [[ $KUBE_RELEASE_RUN_TESTS =~ ^[yY]$ ]]; then
|
|||||||
make test
|
make test
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$KUBE_ROOT/build/package-tarballs.sh
|
"${KUBE_ROOT}/build/package-tarballs.sh"
|
||||||
|
@ -25,7 +25,7 @@ set -o errexit
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
source "${KUBE_ROOT}/build/common.sh"
|
source "${KUBE_ROOT}/build/common.sh"
|
||||||
source "${KUBE_ROOT}/build/lib/release.sh"
|
source "${KUBE_ROOT}/build/lib/release.sh"
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ set -o errexit
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
source "$KUBE_ROOT/build/common.sh"
|
source "$KUBE_ROOT/build/common.sh"
|
||||||
|
|
||||||
KUBE_RUN_COPY_OUTPUT="${KUBE_RUN_COPY_OUTPUT:-y}"
|
KUBE_RUN_COPY_OUTPUT="${KUBE_RUN_COPY_OUTPUT:-y}"
|
||||||
|
@ -22,7 +22,7 @@ set -o errexit
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
source "${KUBE_ROOT}/build/common.sh"
|
source "${KUBE_ROOT}/build/common.sh"
|
||||||
|
|
||||||
KUBE_RUN_COPY_OUTPUT="${KUBE_RUN_COPY_OUTPUT:-n}" "${KUBE_ROOT}/build/run.sh" bash "$@"
|
KUBE_RUN_COPY_OUTPUT="${KUBE_RUN_COPY_OUTPUT:-n}" "${KUBE_ROOT}/build/run.sh" bash "$@"
|
||||||
|
@ -16,17 +16,17 @@
|
|||||||
|
|
||||||
# Common utility functions for build scripts
|
# Common utility functions for build scripts
|
||||||
|
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
|
|
||||||
function kube::release::semantic_version() {
|
function kube::release::semantic_version() {
|
||||||
# This takes:
|
# This takes:
|
||||||
# Client Version: version.Info{Major:"1", Minor:"1+", GitVersion:"v1.1.0-alpha.0.2328+3c0a05de4a38e3", GitCommit:"3c0a05de4a38e355d147dbfb4d85bad6d2d73bb9", GitTreeState:"clean"}
|
# Client Version: version.Info{Major:"1", Minor:"1+", GitVersion:"v1.1.0-alpha.0.2328+3c0a05de4a38e3", GitCommit:"3c0a05de4a38e355d147dbfb4d85bad6d2d73bb9", GitTreeState:"clean"}
|
||||||
# and spits back the GitVersion piece in a way that is somewhat
|
# and spits back the GitVersion piece in a way that is somewhat
|
||||||
# resilient to the other fields changing (we hope)
|
# resilient to the other fields changing (we hope)
|
||||||
${KUBE_ROOT}/cluster/kubectl.sh version --client | sed "s/, */\\
|
"${KUBE_ROOT}/cluster/kubectl.sh" version --client | sed "s/, */\\
|
||||||
/g" | egrep "^GitVersion:" | cut -f2 -d: | cut -f2 -d\"
|
/g" | grep -E "^GitVersion:" | cut -f2 -d: | cut -f2 -d\"
|
||||||
}
|
}
|
||||||
|
|
||||||
function kube::release::semantic_image_tag_version() {
|
function kube::release::semantic_image_tag_version() {
|
||||||
printf "$(kube::release::semantic_version)" | tr + _
|
printf "%s" "$(kube::release::semantic_version)" | tr + _
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,5 @@
|
|||||||
./build/build-image/rsyncd.sh
|
|
||||||
./build/common.sh
|
./build/common.sh
|
||||||
./build/copy-output.sh
|
|
||||||
./build/lib/release.sh
|
./build/lib/release.sh
|
||||||
./build/make-build-image.sh
|
|
||||||
./build/make-clean.sh
|
|
||||||
./build/package-tarballs.sh
|
|
||||||
./build/release-images.sh
|
|
||||||
./build/release-in-a-container.sh
|
|
||||||
./build/release.sh
|
|
||||||
./build/run.sh
|
|
||||||
./build/shell.sh
|
|
||||||
./build/util.sh
|
|
||||||
./cluster/addons/addon-manager/kube-addons.sh
|
./cluster/addons/addon-manager/kube-addons.sh
|
||||||
./cluster/addons/fluentd-elasticsearch/es-image/run.sh
|
./cluster/addons/fluentd-elasticsearch/es-image/run.sh
|
||||||
./cluster/addons/fluentd-elasticsearch/fluentd-es-image/run.sh
|
./cluster/addons/fluentd-elasticsearch/fluentd-es-image/run.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user