File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 47
47
48
48
- uses : actions/checkout@v2
49
49
50
- - run : go mod tidy
50
+ - run : dev/format-gomod
51
51
52
52
- run : |
53
53
changes=$(git status --porcelain)
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Copyright 2022 The Kubernetes Authors.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+
18
+ # CI script to run all the test commands
19
+
20
+ set -o errexit
21
+ set -o nounset
22
+ set -o pipefail
23
+
24
+ # cd to the repo root
25
+ REPO_ROOT=$( git rev-parse --show-toplevel)
26
+ cd " ${REPO_ROOT} "
27
+
28
+ # Run go mod tidy in each go module
29
+ for module in $( find . -name " go.mod" ) ; do
30
+ dir=" $( dirname ${module} ) "
31
+ pushd " ${dir} "
32
+ go mod tidy
33
+ popd
34
+ done
You can’t perform that action at this time.
0 commit comments