File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed
Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -16,4 +16,7 @@ OS_ROOT="$(dirname "${BASH_SOURCE}")/../.."
1616function os::build::host_platform() {
1717 echo " $( go env GOHOSTOS) /$( go env GOHOSTARCH) "
1818}
19+ function os::log::warning() {
20+ echo " warning: ${1} " 1>&2
21+ }
1922readonly -f os::build::host_platform
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ function os::build::gen-completions() {
1414 local tmpdir=" ${OS_ROOT} /_tmp/gen_comp"
1515 mkdir -p " ${tmpdir} "
1616 # generate the new files
17- ${OS_ROOT} /oc completion ${shell} > $tmpdir /oc
17+ ${oc} completion ${shell} > $tmpdir /oc
1818 # create the list of generated files
1919 ls " ${tmpdir} " | LC_ALL=C sort > " ${tmpdir} /.files_generated"
2020
@@ -42,9 +42,11 @@ function os::build::gen-completions() {
4242}
4343readonly -f os::build::gen-completions
4444
45+ oc=" ${OS_ROOT} /oc"
4546platform=" $( os::build::host_platform) "
4647if [[ " ${platform} " != " linux/amd64" ]]; then
4748 os::log::warning " Generating completions on ${platform} may not be identical to running on linux/amd64 due to conditional compilation."
49+ oc=" ${OS_ROOT} /_output/bin/${platform// \/ / _} /oc"
4850fi
4951
5052OUTPUT_DIR_ROOT=" ${1:- ${OS_ROOT} / contrib/ completions} "
Original file line number Diff line number Diff line change @@ -14,11 +14,5 @@ COMPLETION_ROOT="${OS_ROOT}/${COMPLETION_ROOT_REL}"
1414TMP_COMPLETION_ROOT_REL=" _output/verify-generated-completions/"
1515TMP_COMPLETION_ROOT=" ${OS_ROOT} /${TMP_COMPLETION_ROOT_REL} "
1616
17- platform=" $( os::build::host_platform) "
18- if [[ " ${platform} " != " linux/amd64" ]]; then
19- os::log::warning " Completions cannot be verified on non-Linux systems (${platform} )"
20- exit 0
21- fi
22-
2317${OS_ROOT} /hack/update-generated-completions.sh ${TMP_COMPLETION_ROOT_REL}
2418diff -Naupr -x ' OWNERS' ${COMPLETION_ROOT} ${TMP_COMPLETION_ROOT}
You can’t perform that action at this time.
0 commit comments