| Josh Bleecher Snyder | 973413b | 2025-07-08 19:35:05 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | set -e |
| 3 | |
| 4 | # This script is called by GoReleaser for each target |
| 5 | # GOOS and GOARCH are set by GoReleaser |
| 6 | # We prepare the embedded assets, then let GoReleaser do the final go build |
| 7 | |
| 8 | echo "Preparing embedded assets for GOOS=$GOOS GOARCH=$GOARCH" |
| 9 | |
| 10 | # Build webui assets (only once) |
| 11 | if [ ! -d "embedded/webui-dist" ]; then |
| 12 | echo "Building webui assets..." |
| 13 | make webui-assets |
| 14 | fi |
| 15 | |
| 16 | # Build innie binaries (only once) |
| 17 | if [ ! -f "embedded/sketch-linux/sketch-linux-amd64" ] || [ ! -f "embedded/sketch-linux/sketch-linux-arm64" ]; then |
| 18 | echo "Building innie binaries..." |
| 19 | make innie |
| 20 | fi |
| 21 | |
| 22 | echo "Assets prepared. GoReleaser will now build the outie binary." |