mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
* switch to go modules * update vendor (go mod vendor) * swithing to go mod: update docs and makefile * update goget-tools * use go mod verify to check vendor * Update goget-tools - pin goget-tools versions - update gikgo to 1.14.0 - reset GOFLAGS for goget-tools - fix ginkgo get for Prow * go mod: replace github.com/kr/pty with github.com/creack/pty * update vendor (go mod vendor) * fix make cross target -mod=vendor was not used for corss compiling
19 lines
587 B
Bash
Executable File
19 lines
587 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# This will cross-compile odo for all platforms:
|
|
# Windows, Linux and macOS
|
|
|
|
if [[ -z "${*}" ]]; then
|
|
echo "Build flags are missing"
|
|
exit 1
|
|
fi
|
|
|
|
for platform in linux-amd64 linux-arm64 linux-ppc64le linux-s390x darwin-amd64 windows-amd64 ; do
|
|
echo "Cross compiling $platform and placing binary at dist/bin/$platform/"
|
|
if [ $platform == "windows-amd64" ]; then
|
|
GOARCH=amd64 GOOS=windows go build -o dist/bin/$platform/odo.exe "${@}" ./cmd/odo/
|
|
else
|
|
GOARCH=${platform#*-} GOOS=${platform%-*} go build -o dist/bin/$platform/odo "${@}" ./cmd/odo/
|
|
fi
|
|
done
|