chore(Makefile): add per-platform 'go mod download' inside cross loop for extra robustness in CI cross-compilation environments
Some checks failed
gobuild / build (push) Failing after 6s
Release / Create Release (push) Successful in 2m32s

This commit is contained in:
Greg Gauthier 2026-06-06 07:51:23 +01:00
parent 0a4c457cb4
commit f3d338ea4f

View File

@ -58,6 +58,7 @@ cross: deps
BIN="gostations-$$OS-$$ARCH"; \ BIN="gostations-$$OS-$$ARCH"; \
if [ "$$OS" = "windows" ]; then BIN="$$BIN.exe"; fi; \ if [ "$$OS" = "windows" ]; then BIN="$$BIN.exe"; fi; \
echo "Building $$BIN..."; \ echo "Building $$BIN..."; \
GOOS=$$OS GOARCH=$$ARCH go mod download; \
GOOS=$$OS GOARCH=$$ARCH go build -trimpath -ldflags "$(LDFLAGS)" -o "build/$$BIN" . ; \ GOOS=$$OS GOARCH=$$ARCH go build -trimpath -ldflags "$(LDFLAGS)" -o "build/$$BIN" . ; \
done done
@echo "✅ Cross builds complete in build/" @echo "✅ Cross builds complete in build/"