Skip to content

Commit

Permalink
Updating cross-compile script to produce stripped binaries (#3864)
Browse files Browse the repository at this point in the history
- This is a soft requirement for downstream releases
   which will need waiver every time, if not done

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
  • Loading branch information
mohammedzee1000 authored Aug 31, 2020
1 parent ce2b6d0 commit 89b5ab6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/cross-compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 89b5ab6

Please sign in to comment.