canihazip/build.sh

17 lines
357 B
Bash
Raw Normal View History

2024-04-11 17:45:14 -06:00
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
OUTPUTFILE="dist/canihazip"
mkdir -p "$SCRIPT_DIR/dist"
rm "$SCRIPT_DIR"/dist/canihazip &> /dev/null
go mod tidy
go build -v -trimpath -ldflags "-s -w" -o "$OUTPUTFILE"
if [ $? -eq 0 ]; then
chmod +x "$OUTPUTFILE"
echo "Build Succeeded -> $OUTPUTFILE"
fi