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
924fd3b0
Commit
924fd3b0
authored
Dec 16, 2017
by
Jeff Grafton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update helper scripts to find binaries in new bazel-bin paths
parent
a532ecd7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
clientbin.sh
cluster/clientbin.sh
+6
-1
util.sh
hack/lib/util.sh
+4
-3
No files found.
cluster/clientbin.sh
View file @
924fd3b0
...
...
@@ -84,9 +84,14 @@ function get_bin() {
"
${
KUBE_ROOT
}
/_output/bin/
${
bin
}
"
"
${
KUBE_ROOT
}
/_output/dockerized/bin/
${
host_os
}
/
${
host_arch
}
/
${
bin
}
"
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_os
}
/
${
host_arch
}
/
${
bin
}
"
"
${
KUBE_ROOT
}
/bazel-bin/
${
srcdir
}
/
${
bin
}
"
"
${
KUBE_ROOT
}
/platforms/
${
host_os
}
/
${
host_arch
}
/
${
bin
}
"
)
# Also search for binary in bazel build tree.
# The bazel go rules place binaries in subtrees like
# "bazel-bin/source/path/linux_amd64_pure_stripped/binaryname", so make sure
# the platform name is matched in the path.
locations+
=(
$(
find
"
${
KUBE_ROOT
}
/bazel-bin/
${
srcdir
}
"
-type
f
-executable
\
-path
"*/
${
host_os
}
_
${
host_arch
}
*/
${
bin
}
"
2>/dev/null
||
true
)
)
echo
$(
(
ls
-t
"
${
locations
[@]
}
"
2>/dev/null
||
true
)
|
head
-1
)
}
...
...
hack/lib/util.sh
View file @
924fd3b0
...
...
@@ -148,10 +148,11 @@ kube::util::find-binary-for-platform() {
"
${
KUBE_ROOT
}
/platforms/
${
platform
}
/
${
lookfor
}
"
)
# Also search for binary in bazel build tree.
# In some cases we have to name the binary $BINARY_bin, since there was a
# directory named $BINARY next to it.
# The bazel go rules place binaries in subtrees like
# "bazel-bin/source/path/linux_amd64_pure_stripped/binaryname", so make sure
# the platform name is matched in the path.
locations+
=(
$(
find
"
${
KUBE_ROOT
}
/bazel-bin/"
-type
f
-executable
\
\(
-name
"
${
lookfor
}
"
-o
-name
"
${
lookfor
}
_bin"
\)
2>/dev/null
||
true
)
)
-path
"*/
${
platform
/\//_
}
*/
${
lookfor
}
"
2>/dev/null
||
true
)
)
# List most recently-updated location.
local
-r
bin
=
$(
(
ls
-t
"
${
locations
[@]
}
"
2>/dev/null
||
true
)
|
head
-1
)
...
...
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