mirror of https://github.com/knative/client.git
Separates cross compile in hack/build.sh from default flow (#489)
- `./hack/build.sh` performs usual flow of codegen, build and test - `./hack/build.sh -x` only compiles cross platform - Updates hack/build.sh help message to reflect this
This commit is contained in:
parent
c4a919718d
commit
cf40c25657
|
@ -80,16 +80,17 @@ run() {
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Cross compile only
|
||||||
|
if $(has_flag --all -x); then
|
||||||
|
cross_build || (echo "✋ Cross platform build failed" && exit 1)
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Default flow
|
# Default flow
|
||||||
codegen
|
codegen
|
||||||
go_build
|
go_build
|
||||||
go_test
|
go_test
|
||||||
|
|
||||||
# Cross compile in addition if requested
|
|
||||||
if $(has_flag --all -x); then
|
|
||||||
cross_build || (echo "✋ Cross platform build failed" && exit 1)
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "────────────────────────────────────────────"
|
echo "────────────────────────────────────────────"
|
||||||
./kn version
|
./kn version
|
||||||
}
|
}
|
||||||
|
@ -297,7 +298,7 @@ with the following options:
|
||||||
-t --test Run tests when used with --fast or --watch
|
-t --test Run tests when used with --fast or --watch
|
||||||
-c --codegen Runs formatting, doc gen and update without compiling/testing
|
-c --codegen Runs formatting, doc gen and update without compiling/testing
|
||||||
-w --watch Watch for source changes and recompile in fast mode
|
-w --watch Watch for source changes and recompile in fast mode
|
||||||
-x --all Build binaries for all platforms
|
-x --all Only build cross platform binaries without code-generation/testing
|
||||||
-h --help Display this help message
|
-h --help Display this help message
|
||||||
--verbose More output
|
--verbose More output
|
||||||
--debug Debug information for this script (set -x)
|
--debug Debug information for this script (set -x)
|
||||||
|
|
Loading…
Reference in New Issue