d70ed1943f
Build and Deploy / build-and-deploy (push) Successful in 44s
- scripts/build: gofmt, go vet, go build, docker build - AGENTS.md: agents must run ./scripts/build before committing - Fix gofmt issues in handler/auth.go and store/store.go
30 lines
482 B
Python
Executable File
30 lines
482 B
Python
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
echo "==> gofmt check"
|
|
unformatted=$(gofmt -l .)
|
|
if [ -n "$unformatted" ]; then
|
|
echo "Unformatted files:"
|
|
echo "$unformatted"
|
|
gofmt -d .
|
|
echo "Run: gofmt -w ."
|
|
exit 1
|
|
fi
|
|
echo " ok"
|
|
|
|
echo "==> go vet"
|
|
go vet ./...
|
|
echo " ok"
|
|
|
|
echo "==> go build"
|
|
CGO_ENABLED=0 go build -o podstalk .
|
|
echo " ok"
|
|
|
|
echo "==> docker build"
|
|
docker build -t podstalk .
|
|
echo " ok"
|
|
|
|
echo "==> all checks passed"
|