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

fix shellcheck pass in sample-apiserver #73210

Merged
merged 1 commit into from
Jan 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions hack/.shellcheck_failures
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,6 @@
./staging/src/k8s.io/metrics/hack/verify-codegen.sh
./staging/src/k8s.io/node-api/hack/update-codegen.sh
./staging/src/k8s.io/node-api/hack/verify-codegen.sh
./staging/src/k8s.io/sample-apiserver/hack/build-image.sh
./staging/src/k8s.io/sample-apiserver/hack/update-codegen.sh
./staging/src/k8s.io/sample-apiserver/hack/verify-codegen.sh
./test/cmd/apply.sh
./test/cmd/apps.sh
./test/cmd/authorization.sh
Expand Down
5 changes: 4 additions & 1 deletion staging/src/k8s.io/sample-apiserver/hack/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -o errexit
set -o nounset
set -o pipefail

KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../../../../..
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../../../../..
source "${KUBE_ROOT}/hack/lib/util.sh"

# Register function to be called on EXIT to remove generated binary.
Expand Down
18 changes: 9 additions & 9 deletions staging/src/k8s.io/sample-apiserver/hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ set -o errexit
set -o nounset
set -o pipefail

SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/..
CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)}
SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
CODEGEN_PKG=${CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)}

# generate the code with:
# --output-base because this script should also be able to run inside the vendor dir of
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
# instead of the $GOPATH directly. For normal projects this can be dropped.
${CODEGEN_PKG}/generate-groups.sh all \
"${CODEGEN_PKG}/generate-groups.sh" all \
k8s.io/sample-apiserver/pkg/client k8s.io/sample-apiserver/pkg/apis \
"wardle:v1alpha1,v1beta1" \
--output-base "$(dirname ${BASH_SOURCE})/../../.." \
--go-header-file ${SCRIPT_ROOT}/hack/boilerplate.go.txt
--output-base "$(dirname "${BASH_SOURCE[0]}")/../../.." \
--go-header-file "${SCRIPT_ROOT}"/hack/boilerplate.go.txt

${CODEGEN_PKG}/generate-internal-groups.sh "deepcopy,defaulter,conversion" \
"${CODEGEN_PKG}/generate-internal-groups.sh" "deepcopy,defaulter,conversion" \
k8s.io/sample-apiserver/pkg/client k8s.io/sample-apiserver/pkg/apis k8s.io/sample-apiserver/pkg/apis \
"wardle:v1alpha1,v1beta1" \
--output-base "$(dirname ${BASH_SOURCE})/../../.." \
--go-header-file ${SCRIPT_ROOT}/hack/boilerplate.go.txt
--output-base "$(dirname "${BASH_SOURCE[0]}")/../../.." \
--go-header-file "${SCRIPT_ROOT}/hack/boilerplate.go.txt"

# To use your own boilerplate text use:
# --go-header-file ${SCRIPT_ROOT}/hack/custom-boilerplate.go.txt
# --go-header-file "${SCRIPT_ROOT}/hack/custom-boilerplate.go.txt"
3 changes: 1 addition & 2 deletions staging/src/k8s.io/sample-apiserver/hack/verify-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail

SCRIPT_ROOT=$(dirname "${BASH_SOURCE}")/..
SCRIPT_BASE=${SCRIPT_ROOT}/../..
SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/..

DIFFROOT="${SCRIPT_ROOT}/pkg"
TMP_DIFFROOT="${SCRIPT_ROOT}/_tmp/pkg"
Expand Down