blob: 37a64dc3315e58117179e1a201e89ab48b0102d6 [file] [log] [blame]
#!/bin/bash
set -e
# This script is called by GoReleaser for each target
# GOOS and GOARCH are set by GoReleaser
# We prepare the embedded assets, then let GoReleaser do the final go build
echo "Preparing embedded assets for GOOS=$GOOS GOARCH=$GOARCH"
# Build webui assets (only once)
if [ ! -d "embedded/webui-dist" ]; then
echo "Building webui assets..."
make webui-assets
fi
# Build innie binaries (only once)
if [ ! -f "embedded/sketch-linux/sketch-linux-amd64" ] || [ ! -f "embedded/sketch-linux/sketch-linux-arm64" ]; then
echo "Building innie binaries..."
make innie
fi
echo "Assets prepared. GoReleaser will now build the outie binary."