* feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> * feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> --------- Signed-off-by: ci-bot <ci-bot@kubesphere.io> Co-authored-by: ks-ci-bot <ks-ci-bot@example.com> Co-authored-by: joyceliu <joyceliu@yunify.com>
34 lines
809 B
Bash
Executable File
34 lines
809 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# GoFmt apparently is changing @ head...
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
|
source "${KUBE_ROOT}/hack/lib/init.sh"
|
|
|
|
kube::golang::verify_go_version
|
|
|
|
cd "${KUBE_ROOT}"
|
|
|
|
find_files() {
|
|
find . -not \( \
|
|
\( \
|
|
-wholename './output' \
|
|
-o -wholename './.git' \
|
|
-o -wholename './_output' \
|
|
-o -wholename './_gopath' \
|
|
-o -wholename './release' \
|
|
-o -wholename './target' \
|
|
-o -wholename '*/third_party/*' \
|
|
-o -wholename '*/vendor/*' \
|
|
-o -wholename './staging/src/kubesphere.io/client-go/*vendor/*' \
|
|
-o -wholename './staging/src/kubesphere.io/api/*/zz_generated.deepcopy.go' \
|
|
\) -prune \
|
|
\) -name '*.go'
|
|
}
|
|
|
|
find_files | xargs gofmt -s -w
|