mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-28 06:29:29 +01:00
Add hack scripts and makefile targets
This commit is contained in:
6
Makefile
6
Makefile
@@ -88,7 +88,7 @@ push-all: image.amd64 image.arm64
|
|||||||
clean:
|
clean:
|
||||||
rm -rf _output
|
rm -rf _output
|
||||||
|
|
||||||
verify: verify-gofmt verify-vendor lint lint-chart verify-spelling
|
verify: verify-gofmt verify-vendor lint lint-chart verify-spelling verify-toc
|
||||||
|
|
||||||
verify-spelling:
|
verify-spelling:
|
||||||
./hack/verify-spelling.sh
|
./hack/verify-spelling.sh
|
||||||
@@ -99,6 +99,9 @@ verify-gofmt:
|
|||||||
verify-vendor:
|
verify-vendor:
|
||||||
./hack/verify-vendor.sh
|
./hack/verify-vendor.sh
|
||||||
|
|
||||||
|
verify-toc:
|
||||||
|
./hack/verify-toc.sh
|
||||||
|
|
||||||
test-unit:
|
test-unit:
|
||||||
./test/run-unit-tests.sh
|
./test/run-unit-tests.sh
|
||||||
|
|
||||||
@@ -109,6 +112,7 @@ gen:
|
|||||||
./hack/update-generated-conversions.sh
|
./hack/update-generated-conversions.sh
|
||||||
./hack/update-generated-deep-copies.sh
|
./hack/update-generated-deep-copies.sh
|
||||||
./hack/update-generated-defaulters.sh
|
./hack/update-generated-defaulters.sh
|
||||||
|
./hack/update-toc.sh
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
ifndef HAS_GOLANGCI
|
ifndef HAS_GOLANGCI
|
||||||
|
|||||||
25
hack/update-toc.sh
Executable file
25
hack/update-toc.sh
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2021 The Kubernetes Authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
source "$(dirname "${BASH_SOURCE}")/lib/init.sh"
|
||||||
|
|
||||||
|
go build -o "${OS_OUTPUT_BINPATH}/mdtoc" "sigs.k8s.io/mdtoc"
|
||||||
|
|
||||||
|
${OS_OUTPUT_BINPATH}/mdtoc --inplace README.md
|
||||||
29
hack/verify-toc.sh
Executable file
29
hack/verify-toc.sh
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2021 The Kubernetes Authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
source "$(dirname "${BASH_SOURCE}")/lib/init.sh"
|
||||||
|
|
||||||
|
go build -o "${OS_OUTPUT_BINPATH}/mdtoc" "sigs.k8s.io/mdtoc"
|
||||||
|
|
||||||
|
if ! ${OS_OUTPUT_BINPATH}/mdtoc --inplace --dryrun README.md
|
||||||
|
then
|
||||||
|
echo "ERROR: Changes detected to table of contents. Run ./hack/update-toc.sh" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user