mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
scripts: build script
This commit is contained in:
@@ -30,6 +30,10 @@ fi
|
||||
echo "--> Getting dependencies..."
|
||||
go get ./...
|
||||
|
||||
# Delete the old dir
|
||||
echo "--> Removing old directory..."
|
||||
rm -f bin/*
|
||||
|
||||
# Build!
|
||||
echo "--> Building..."
|
||||
gox \
|
||||
@@ -41,6 +45,20 @@ gox \
|
||||
mv bin/terraform-terraform${EXTENSION} bin/terraform${EXTENSION}
|
||||
cp bin/terraform* ${GOPATHSINGLE}/bin
|
||||
|
||||
# If we're on Windows, get the DLL in there
|
||||
if [ "$(go env GOOS)" = "windows" ]; then
|
||||
cp libucl.dll bin/
|
||||
fi
|
||||
|
||||
if [ "${TF_DEV}x" = "x" ]; then
|
||||
# Zip and copy to the dist dir
|
||||
echo "--> Packaging..."
|
||||
mkdir -p pkg
|
||||
cd bin/
|
||||
zip ../pkg/$(go env GOOS)_$(go env GOARCH).zip ./*
|
||||
cd $DIR
|
||||
fi
|
||||
|
||||
# Done!
|
||||
echo
|
||||
echo "--> Results:"
|
||||
|
||||
Reference in New Issue
Block a user