Skip to content

Commit

Permalink
Using go env variable instead of uname for determining platform
Browse files Browse the repository at this point in the history
Signed-off-by: praveengt <praveen.gt@flipkart.com>
  • Loading branch information
praveengt committed Dec 21, 2020
1 parent 2af3236 commit 50bb4de
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions buildscripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ echo -e "\nbuilding the ZFS Driver version :- $VERSION\n"

VERSION_META="$(cat $PWD/BUILDMETA)"

XC_OS=$(go env GOOS)
XC_ARCH=$(go env GOARCH)

if [ "$XC_OS" != "linux" -a "$XC_OS" != "darwin" ] ; then
# Determine the arch/os combos we're building for
UNAME=$(uname)
ARCH=$(uname -m)
if [ "$UNAME" != "Linux" -a "$UNAME" != "Darwin" ] ; then
echo "Sorry, this OS is not supported yet."
exit 1
fi
Expand All @@ -83,6 +83,9 @@ echo "==> Removing old directory..."
rm -rf bin/${PNAME}/*
mkdir -p bin/${PNAME}/

XC_OS=$(go env GOOS)
XC_ARCH=$(go env GOARCH)

# Build!
echo "==> Building ${CTLNAME} using $(go version)... "

Expand Down

0 comments on commit 50bb4de

Please sign in to comment.