stillbox/Makefile

56 lines
1.2 KiB
Makefile
Raw Normal View History

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-12-16 16:19:41 -05:00
all: client/stillbox/dist
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-12-16 16:19:41 -05:00
client/stillbox/dist:
cd client/stillbox && npm install && ng build -c production
2024-08-10 10:42:22 -04:00
2025-01-02 22:18:32 -05:00
web: web-install web-build
web-build:
cd client/stillbox && ng build -c production
web-install:
cd client/stillbox && npm install
2024-08-10 18:21:13 -04:00
2024-11-22 15:25:52 -05:00
clean:
2024-12-16 16:19:41 -05:00
rm -rf client/calls/ client/stillbox/dist/ client/stillbox/node_modules/
2024-11-22 15:25:52 -05:00
rm -f stillbox calls stillbox-pprof
2024-08-10 10:42:22 -04:00
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-11-15 12:18:32 -05:00
go generate ./...
2024-11-25 16:04:07 -05:00
go run ./util/omitempty/omitempty.go
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:
2024-11-15 10:41:04 -05:00
sh util/dumpdb.sh
2024-11-13 19:40:24 -05:00
backupplain:
2024-11-15 10:41:04 -05:00
sh util/dumpdb.sh -p
2024-11-13 19:40:24 -05:00
2024-10-31 16:27:48 -04:00
test:
go test -v ./...
2024-11-13 19:58:49 -05:00
run:
go run -v ./cmd/stillbox/ serve