drive-health/build.sh

20 lines
407 B
Bash
Raw Permalink Normal View History

2024-01-22 01:49:13 +02:00
#!/bin/sh
set -o pipefail
set -u
2024-01-20 02:11:59 +02:00
APP_NAME="drive-health"
2024-01-22 01:49:13 +02:00
DIST_DIR="${DIST_DIR:-dist}"
2024-01-20 02:11:59 +02:00
# Create the dist directory if it doesn't exist
mkdir -p $DIST_DIR
# Build the application
echo "Building the application..."
2024-01-22 01:49:13 +02:00
GOOS=linux CGO_ENABLED=1 GOARCH=amd64 go build -o $DIST_DIR/$APP_NAME
2024-01-20 02:11:59 +02:00
2024-01-22 01:49:13 +02:00
# echo "Copying additional resources..."
cp -r static templates $DIST_DIR/
2024-01-20 02:11:59 +02:00
echo "Compilation and packaging completed."