2024-10-21 22:37:44 -04:00
|
|
|
VPKG=dynatron.me/x/stillbox/internal/version
|
2024-10-18 08:47:30 -04:00
|
|
|
VER!=git describe --tags --always --dirty
|
2024-11-02 09:41:48 -04:00
|
|
|
BUILDDATE!=date '+%Y%m%d'
|
2024-10-18 09:34:20 -04:00
|
|
|
LDFLAGS=-ldflags="-X '${VPKG}.Version=${VER}' -X '${VPKG}.Built=${BUILDDATE}'"
|
2024-11-13 19:10:15 -05:00
|
|
|
GOFLAGS=-v
|
2024-10-21 22:37:44 -04:00
|
|
|
|
2024-08-10 18:21:13 -04:00
|
|
|
all: checkcalls
|
2024-11-03 07:19:03 -05:00
|
|
|
go build -o stillbox ${GOFLAGS} ${LDFLAGS} ./cmd/stillbox/
|
2024-10-30 09:49:45 -04:00
|
|
|
go build -o calls ${GOFLAGS} ${LDFLAGS} ./cmd/calls/
|
|
|
|
|
|
|
|
buildpprof:
|
2024-11-03 07:19:03 -05:00
|
|
|
go build -o stillbox-pprof ${GOFLAGS} ${LDFLAGS} -tags pprof ./cmd/stillbox
|
2024-07-14 17:39:03 -04:00
|
|
|
|
2024-08-10 10:42:22 -04:00
|
|
|
clean:
|
|
|
|
rm -rf client/calls/ && mkdir client/calls && touch client/calls/.gitkeep
|
2024-11-03 07:19:03 -05:00
|
|
|
rm -f stillbox calls stillbox-pprof
|
2024-08-10 10:42:22 -04:00
|
|
|
|
2024-08-10 18:21:13 -04:00
|
|
|
checkcalls:
|
2024-08-10 18:25:54 -04:00
|
|
|
@test -e client/calls/index.html || make getcalls
|
2024-08-10 18:21:13 -04:00
|
|
|
|
2024-08-10 10:42:22 -04:00
|
|
|
getcalls:
|
|
|
|
rm -rf client/calls/*
|
|
|
|
cd client/calls/ && curl -OL https://nightly.link/amigan/calls/workflows/build-web/trunk/webBuild.zip && unzip -o webBuild.zip && rm webBuild.zip
|
|
|
|
|
2024-07-14 17:39:03 -04:00
|
|
|
generate:
|
|
|
|
sqlc generate -f sql/sqlc.yaml
|
2024-07-31 09:24:05 -04:00
|
|
|
protoc -I=pkg/pb/ --go_out=pkg/ pkg/pb/stillbox.proto
|
2024-08-08 22:01:03 -04:00
|
|
|
|
2024-08-11 14:48:17 -04:00
|
|
|
lint:
|
|
|
|
golangci-lint run
|
2024-10-31 16:27:48 -04:00
|
|
|
|
|
|
|
coverage-html:
|
|
|
|
go tool cover -html=cover.out
|
|
|
|
|
|
|
|
coverage:
|
|
|
|
go test -coverprofile cover.out
|
|
|
|
|
2024-11-13 19:40:24 -05:00
|
|
|
# backup backs up the database without calls
|
|
|
|
backup:
|
|
|
|
sh .bin/dumpdb.sh
|
|
|
|
|
|
|
|
backupplain:
|
|
|
|
sh .bin/dumpdb.sh -p
|
|
|
|
|
2024-10-31 16:27:48 -04:00
|
|
|
test:
|
|
|
|
go test -v ./...
|