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
9848d6cc
Commit
9848d6cc
authored
Nov 29, 2016
by
Jeff Grafton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: clean platform envs to prevent cross-contamination
parent
ea576b7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
golang.sh
hack/lib/golang.sh
+8
-2
No files found.
hack/lib/golang.sh
View file @
9848d6cc
...
...
@@ -219,6 +219,8 @@ kube::golang::set_platform_envs() {
[[
-n
${
1
-
}
]]
||
{
kube::log::error_exit
"!!! Internal error. No platform set in kube::golang::set_platform_envs"
}
# make sure we have a clean slate first
kube::golang::unset_platform_envs
export
GOOS
=
${
platform
%/*
}
export
GOARCH
=
${
platform
##*/
}
...
...
@@ -456,6 +458,8 @@ kube::golang::build_binaries_for_platform() {
local
-a
nonstatics
=()
local
-a
tests
=()
V
=
2 kube::log::info
"Env for
${
platform
}
: GOOS=
${
GOOS
-
}
GOARCH=
${
GOARCH
-
}
GOROOT=
${
GOROOT
-
}
CGO_ENABLED=
${
CGO_ENABLED
-
}
CC=
${
CC
-
}
"
for
binary
in
"
${
binaries
[@]
}
"
;
do
if
[[
"
${
binary
}
"
=
~
".test"
$
]]
;
then
...
...
@@ -685,8 +689,10 @@ kube::golang::build_binaries() {
else
for
platform
in
"
${
platforms
[@]
}
"
;
do
kube::log::status
"Building go targets for
${
platform
}
:"
"
${
targets
[@]
}
"
kube::golang::set_platform_envs
"
${
platform
}
"
kube::golang::build_binaries_for_platform
${
platform
}
${
use_go_build
:-}
(
kube::golang::set_platform_envs
"
${
platform
}
"
kube::golang::build_binaries_for_platform
${
platform
}
${
use_go_build
:-}
)
done
fi
)
...
...
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