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
28d7b9a3
Unverified
Commit
28d7b9a3
authored
Sep 25, 2018
by
k8s-ci-robot
Committed by
GitHub
Sep 25, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #68412 from Katharine/nit-use-kube-build-coverage-directly
Use KUBE_BUILD_WITH_COVERAGE directly
parents
57cd1725
449e94b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
golang.sh
hack/lib/golang.sh
+3
-4
No files found.
hack/lib/golang.sh
View file @
28d7b9a3
...
...
@@ -523,14 +523,14 @@ kube::golang::delete_coverage_dummy_test() {
# Arguments: a list of kubernetes packages to build.
# Expected variables: ${build_args} should be set to an array of Go build arguments.
# In addition, ${package} and ${platform} should have been set earlier, and if
# ${
build_with_coverage
} is set, coverage instrumentation will be enabled.
# ${
KUBE_BUILD_WITH_COVERAGE
} is set, coverage instrumentation will be enabled.
#
# Invokes Go to actually build some packages. If coverage is disabled, simply invokes
# go install. If coverage is enabled, builds covered binaries using go test, temporarily
# producing the required unit test files and then cleaning up after itself.
# Non-covered binaries are then built using go install as usual.
kube::golang::build_some_binaries
()
{
if
[[
-n
"
${
build_with_coverage
:-}
"
]]
;
then
if
[[
-n
"
${
KUBE_BUILD_WITH_COVERAGE
:-}
"
]]
;
then
local
-a
uncovered
=()
for
package
in
"
$@
"
;
do
if
kube::golang::is_instrumented_package
"
${
package
}
"
;
then
...
...
@@ -661,11 +661,10 @@ kube::golang::build_binaries() {
host_platform
=
$(
kube::golang::host_platform
)
# Use eval to preserve embedded quoted strings.
local
goflags goldflags gogcflags
build_with_coverage
local
goflags goldflags gogcflags
eval
"goflags=(
${
GOFLAGS
:-}
)"
goldflags
=
"
${
GOLDFLAGS
:-}
$(
kube::version::ldflags
)
"
gogcflags
=
"
${
GOGCFLAGS
:-}
"
build_with_coverage
=
"
${
KUBE_BUILD_WITH_COVERAGE
:-}
"
local
-a
targets
=()
local
arg
...
...
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