Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
fe895f04
Unverified
Commit
fe895f04
authored
May 15, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
May 15, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #76420 from k-toyoda-pi/fix_shellcheck_failure_make-rules_3
fix shellcheck failures in /hack/make-rules/update.sh,verify.sh
parents
aaec77a9
9a5655c9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
25 deletions
+21
-25
.shellcheck_failures
hack/.shellcheck_failures
+0
-2
update.sh
hack/make-rules/update.sh
+4
-8
verify.sh
hack/make-rules/verify.sh
+17
-15
No files found.
hack/.shellcheck_failures
View file @
fe895f04
...
@@ -23,8 +23,6 @@
...
@@ -23,8 +23,6 @@
./hack/lib/version.sh
./hack/lib/version.sh
./hack/make-rules/make-help.sh
./hack/make-rules/make-help.sh
./hack/make-rules/test.sh
./hack/make-rules/test.sh
./hack/make-rules/update.sh
./hack/make-rules/verify.sh
./hack/pin-dependency.sh
./hack/pin-dependency.sh
./hack/test-integration.sh
./hack/test-integration.sh
./hack/update-vendor.sh
./hack/update-vendor.sh
...
...
hack/make-rules/update.sh
View file @
fe895f04
...
@@ -19,7 +19,7 @@ set -o errexit
...
@@ -19,7 +19,7 @@ set -o errexit
set
-o
nounset
set
-o
nounset
set
-o
pipefail
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../..
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
# If called directly, exit.
# If called directly, exit.
...
@@ -32,10 +32,6 @@ fi
...
@@ -32,10 +32,6 @@ fi
SILENT
=
${
SILENT
:-
true
}
SILENT
=
${
SILENT
:-
true
}
ALL
=
${
FORCE_ALL
:-
false
}
ALL
=
${
FORCE_ALL
:-
false
}
V
=
""
if
[[
"
${
SILENT
}
"
!=
"true"
]]
;
then
V
=
"-v"
fi
trap
'exit 1'
SIGINT
trap
'exit 1'
SIGINT
...
@@ -59,10 +55,10 @@ BASH_TARGETS="
...
@@ -59,10 +55,10 @@ BASH_TARGETS="
update-gofmt"
update-gofmt"
for
t
in
${
BASH_TARGETS
}
;
do
for
t
in
${
BASH_TARGETS
}
;
do
echo
-e
"
${
color_yellow
}
Running
${
t
}${
color_norm
}
"
echo
-e
"
${
color_yellow
:?
}
Running
${
t
}${
color_norm
:?
}
"
if
${
SILENT
}
;
then
if
${
SILENT
}
;
then
if
!
bash
"
${
KUBE_ROOT
}
/hack/
${
t
}
.sh"
1> /dev/null
;
then
if
!
bash
"
${
KUBE_ROOT
}
/hack/
${
t
}
.sh"
1> /dev/null
;
then
echo
-e
"
${
color_red
}
Running
${
t
}
FAILED
${
color_norm
}
"
echo
-e
"
${
color_red
:?
}
Running
${
t
}
FAILED
${
color_norm
}
"
if
!
${
ALL
}
;
then
if
!
${
ALL
}
;
then
exit
1
exit
1
fi
fi
...
@@ -77,4 +73,4 @@ for t in ${BASH_TARGETS}; do
...
@@ -77,4 +73,4 @@ for t in ${BASH_TARGETS}; do
fi
fi
done
done
echo
-e
"
${
color_green
}
Update scripts completed successfully
${
color_norm
}
"
echo
-e
"
${
color_green
:?
}
Update scripts completed successfully
${
color_norm
}
"
hack/make-rules/verify.sh
View file @
fe895f04
...
@@ -18,7 +18,7 @@ set -o errexit
...
@@ -18,7 +18,7 @@ set -o errexit
set
-o
nounset
set
-o
nounset
set
-o
pipefail
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../..
source
"
${
KUBE_ROOT
}
/hack/lib/util.sh"
source
"
${
KUBE_ROOT
}
/hack/lib/util.sh"
# If KUBE_JUNIT_REPORT_DIR is unset, and ARTIFACTS is set, then have them match.
# If KUBE_JUNIT_REPORT_DIR is unset, and ARTIFACTS is set, then have them match.
...
@@ -80,13 +80,13 @@ QUICK_PATTERNS+=(
...
@@ -80,13 +80,13 @@ QUICK_PATTERNS+=(
"verify-test-owners.sh"
"verify-test-owners.sh"
)
)
EXCLUDED_CHECKS
=
$(
ls
${
EXCLUDED_PATTERNS
[@]/#/
${
KUBE_ROOT
}
\/hack\/
}
2>/dev/null
||
true
)
while
IFS
=
''
read
-r
line
;
do
EXCLUDED_CHECKS+
=(
"
$line
"
)
;
done
< <
(
ls
"
${
EXCLUDED_PATTERNS
[@]/#/
${
KUBE_ROOT
}
\/hack\/
}
"
2>/dev/null
||
true
)
QUICK_CHECKS
=
$(
ls
${
QUICK_PATTERNS
[@]/#/
${
KUBE_ROOT
}
\/hack\/
}
2>/dev/null
||
true
)
while
IFS
=
''
read
-r
line
;
do
QUICK_CHECKS+
=(
"
$line
"
)
;
done
< <
(
ls
"
${
QUICK_PATTERNS
[@]/#/
${
KUBE_ROOT
}
\/hack\/
}
"
2>/dev/null
||
true
)
TARGET_LIST
=()
TARGET_LIST
=()
IFS
=
" "
read
-r
-a
TARGET_LIST
<<<
"
${
WHAT
:-}
"
IFS
=
" "
read
-r
-a
TARGET_LIST
<<<
"
${
WHAT
:-}
"
function
is-excluded
{
function
is-excluded
{
for
e
in
${
EXCLUDED_CHECKS
[@]
}
;
do
for
e
in
"
${
EXCLUDED_CHECKS
[@]
}
"
;
do
if
[[
$1
-ef
"
${
e
}
"
]]
;
then
if
[[
$1
-ef
"
${
e
}
"
]]
;
then
return
return
fi
fi
...
@@ -95,7 +95,7 @@ function is-excluded {
...
@@ -95,7 +95,7 @@ function is-excluded {
}
}
function
is-quick
{
function
is-quick
{
for
e
in
${
QUICK_CHECKS
[@]
}
;
do
for
e
in
"
${
QUICK_CHECKS
[@]
}
"
;
do
if
[[
$1
-ef
"
${
e
}
"
]]
;
then
if
[[
$1
-ef
"
${
e
}
"
]]
;
then
return
return
fi
fi
...
@@ -138,9 +138,9 @@ FAILED_TESTS=()
...
@@ -138,9 +138,9 @@ FAILED_TESTS=()
function
print-failed-tests
{
function
print-failed-tests
{
echo
-e
"========================"
echo
-e
"========================"
echo
-e
"
${
color_red
}
FAILED TESTS
${
color_norm
}
"
echo
-e
"
${
color_red
:?
}
FAILED TESTS
${
color_norm
:?
}
"
echo
-e
"========================"
echo
-e
"========================"
for
t
in
${
FAILED_TESTS
[@]
}
;
do
for
t
in
"
${
FAILED_TESTS
[@]
}
"
;
do
echo
-e
"
${
color_red
}${
t
}${
color_norm
}
"
echo
-e
"
${
color_red
}${
t
}${
color_norm
}
"
done
done
}
}
...
@@ -150,10 +150,11 @@ function run-checks {
...
@@ -150,10 +150,11 @@ function run-checks {
local
-r
runner
=
$2
local
-r
runner
=
$2
local
t
local
t
for
t
in
$
(
ls
${
pattern
})
for
t
in
$
{
pattern
}
do
do
local
check_name
=
"
$(
basename
"
${
t
}
"
)
"
local
check_name
if
[[
!
-z
${
WHAT
:-}
]]
;
then
check_name
=
"
$(
basename
"
${
t
}
"
)
"
if
[[
-n
${
WHAT
:-}
]]
;
then
if
!
is-explicitly-chosen
"
${
check_name
}
"
;
then
if
!
is-explicitly-chosen
"
${
check_name
}
"
;
then
continue
continue
fi
fi
...
@@ -168,15 +169,16 @@ function run-checks {
...
@@ -168,15 +169,16 @@ function run-checks {
fi
fi
fi
fi
echo
-e
"Verifying
${
check_name
}
"
echo
-e
"Verifying
${
check_name
}
"
local
start
=
$(
date
+%s
)
local
start
start
=
$(
date
+%s
)
run-cmd
"
${
runner
}
"
"
${
t
}
"
&&
tr
=
$?
||
tr
=
$?
run-cmd
"
${
runner
}
"
"
${
t
}
"
&&
tr
=
$?
||
tr
=
$?
local
elapsed
=
$(($(
date
+%s
)
-
${
start
}
))
local
elapsed
=
$(($(
date
+%s
)
-
start
))
if
[[
${
tr
}
-eq
0
]]
;
then
if
[[
${
tr
}
-eq
0
]]
;
then
echo
-e
"
${
color_green
}
SUCCESS
${
color_norm
}
${
check_name
}
\t
${
elapsed
}
s"
echo
-e
"
${
color_green
:?
}
SUCCESS
${
color_norm
}
${
check_name
}
\t
${
elapsed
}
s"
else
else
echo
-e
"
${
color_red
}
FAILED
${
color_norm
}
${
check_name
}
\t
${
elapsed
}
s"
echo
-e
"
${
color_red
}
FAILED
${
color_norm
}
${
check_name
}
\t
${
elapsed
}
s"
ret
=
1
ret
=
1
FAILED_TESTS+
=(
${
t
}
)
FAILED_TESTS+
=(
"
${
t
}
"
)
fi
fi
done
done
}
}
...
@@ -190,7 +192,7 @@ function missing-target-checks {
...
@@ -190,7 +192,7 @@ function missing-target-checks {
do
do
[[
-z
"
${
v
}
"
]]
&&
continue
[[
-z
"
${
v
}
"
]]
&&
continue
FAILED_TESTS+
=(
${
v
}
)
FAILED_TESTS+
=(
"
${
v
}
"
)
ret
=
1
ret
=
1
done
done
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment