Skip to content

Commit 1f6bf65

Browse files
authored
Merge pull request #1255 from vincepri/fix-make-verify
Update controller-tools / fix CI verify step
2 parents 7dc552a + 3eacfef commit 1f6bf65

File tree

20 files changed

+293
-113
lines changed

20 files changed

+293
-113
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ clean-clientset: ## Remove all generated clientset files
198198
.PHONY: verify
199199
verify:
200200
./hack/verify-boilerplate.sh
201-
./hack/verify-clientset.sh
202201
./hack/verify-bazel.sh
203202
./hack/verify-doctoc.sh
204203

api/v1alpha2/zz_generated.deepcopy.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ require (
2323
k8s.io/klog v0.3.1
2424
k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5
2525
sigs.k8s.io/controller-runtime v0.2.0-beta.5
26-
sigs.k8s.io/controller-tools v0.2.0-beta.5
26+
sigs.k8s.io/controller-tools v0.2.0-beta.5.0.20190813195144-ba0eb80257fe
2727
sigs.k8s.io/testing_frameworks v0.1.2-0.20190130140139-57f07443c2d4
2828
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5 h1:VBM/0P5TWxwk+Nw6Z+lAw3DKgO76g
276276
k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
277277
sigs.k8s.io/controller-runtime v0.2.0-beta.5 h1:W2jTb239QEwQ+HejhTCF9GriFPy2zmo1I6pPmJTeEy8=
278278
sigs.k8s.io/controller-runtime v0.2.0-beta.5/go.mod h1:HweyYKQ8fBuzdu2bdaeBJvsFgAi/OqBBnrVGXcqKhME=
279-
sigs.k8s.io/controller-tools v0.2.0-beta.5 h1:imdq9hdihQFOjjtSXvJ3xfTm2FiFAUqGRlRLAo7Evxo=
280-
sigs.k8s.io/controller-tools v0.2.0-beta.5/go.mod h1:8t/X+FVWvk6TaBcsa+UKUBbn7GMtvyBKX30SGl4em6Y=
279+
sigs.k8s.io/controller-tools v0.2.0-beta.5.0.20190813195144-ba0eb80257fe h1:p7e8JxcC9XVcf+AKW1kpvaDtWCnLIJ/oEDCRx9x3wQE=
280+
sigs.k8s.io/controller-tools v0.2.0-beta.5.0.20190813195144-ba0eb80257fe/go.mod h1:8t/X+FVWvk6TaBcsa+UKUBbn7GMtvyBKX30SGl4em6Y=
281281
sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U=
282282
sigs.k8s.io/testing_frameworks v0.1.2-0.20190130140139-57f07443c2d4 h1:GtDhkj3cF4A4IW+A9LScsuxvJqA9DE7G7PGH1f8B07U=
283283
sigs.k8s.io/testing_frameworks v0.1.2-0.20190130140139-57f07443c2d4/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U=

hack/verify-clientset.sh

Lines changed: 0 additions & 53 deletions
This file was deleted.

hack/verify-doctoc.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ set -o errexit
1818
set -o nounset
1919
set -o pipefail
2020

21+
command -v doctoc || echo "doctoc is not available on your system, skipping verification" && exit 0
22+
2123
doctoc_files="README.md \
2224
CONTRIBUTING.md \
2325
cmd/clusterctl/README.md \
@@ -33,24 +35,24 @@ function check_doctoc(){
3335
changed_files=""
3436
for file in $doctoc_files
3537
do
36-
res=$(git diff --cached $file)
38+
res=$(git diff --cached "$file")
3739
if [ "$res" ]
3840
then
3941
changed_files="$changed_files\n$file"
4042
fi
4143
done
4244

43-
if [ $changed_files ];then
45+
if [ "${changed_files}" ];then
4446
echo -e "Please update these files: $changed_files."
4547
echo "Update with doctoc FILENAME."
4648
echo "Re-commit with -n/--no-verify option."
47-
exit -1
49+
exit 1
4850
fi
4951

5052
}
5153

52-
doctoc $doctoc_files >/dev/null 2>&1
54+
doctoc "${doctoc_files}" >/dev/null 2>&1
5355
check=$(git diff)
54-
if [ ! -z "$check" ];then
56+
if [ -n "$check" ];then
5557
check_doctoc
5658
fi

pkg/apis/deprecated/v1alpha1/zz_generated.deepcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,8 @@ sigs.k8s.io/controller-runtime/pkg/scheme
528528
sigs.k8s.io/controller-runtime/pkg/client
529529
sigs.k8s.io/controller-runtime/pkg/client/config
530530
sigs.k8s.io/controller-runtime/pkg/manager
531-
sigs.k8s.io/controller-runtime/pkg/runtime/signals
532531
sigs.k8s.io/controller-runtime/pkg/runtime/log
532+
sigs.k8s.io/controller-runtime/pkg/runtime/signals
533533
sigs.k8s.io/controller-runtime/pkg/controller
534534
sigs.k8s.io/controller-runtime/pkg/handler
535535
sigs.k8s.io/controller-runtime/pkg/reconcile
@@ -563,7 +563,7 @@ sigs.k8s.io/controller-runtime/pkg/envtest/printer
563563
sigs.k8s.io/controller-runtime/pkg/internal/controller/metrics
564564
sigs.k8s.io/controller-runtime/pkg/internal/objectutil
565565
sigs.k8s.io/controller-runtime/pkg/conversion
566-
# sigs.k8s.io/controller-tools v0.2.0-beta.5
566+
# sigs.k8s.io/controller-tools v0.2.0-beta.5.0.20190813195144-ba0eb80257fe
567567
sigs.k8s.io/controller-tools/cmd/controller-gen
568568
sigs.k8s.io/controller-tools/pkg/crd
569569
sigs.k8s.io/controller-tools/pkg/deepcopy

vendor/sigs.k8s.io/controller-tools/pkg/crd/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/sigs.k8s.io/controller-tools/pkg/crd/desc_visitor.go

Lines changed: 78 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)