Updating cross-compile script to produce stripped binaries
This is a soft requirement for downstream releases
which will need waiver every time, if not done
@@ -14,8 +14,8 @@ 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 -ldflags="$COMMON_FLAGS" ./cmd/odo/
+ GOARCH=amd64 GOOS=windows go build -o dist/bin/$platform/odo.exe -ldflags="-s -w $COMMON_FLAGS" ./cmd/odo/
else
- GOARCH=${platform#*-} GOOS=${platform%-*} go build -o dist/bin/$platform/odo -ldflags="$COMMON_FLAGS" ./cmd/odo/
+ GOARCH=${platform#*-} GOOS=${platform%-*} go build -o dist/bin/$platform/odo -ldflags="-s -w $COMMON_FLAGS" ./cmd/odo/
fi
done
