relay/Makefile

56 lines
1.5 KiB
Makefile
Raw Normal View History

PROJECT_NAME=relay
.DEFAULT_GOAL := test
build-snapshot: export GPG_FINGERPRINT=922248E5D4629F2284964DB103B64DFCECF2BE40
build-snapshot: clean
goreleaser release --snapshot
bun-new-migration: export BUN_TIMESTAMP=$(shell date +%Y%m%d%H%M%S | head -c 14)
bun-new-migration:
touch internal/db/bun/migrations/${BUN_TIMESTAMP}_new.go
cat internal/db/bun/migrations/migration.go.tmpl > internal/db/bun/migrations/${BUN_TIMESTAMP}_new.go
clean:
@echo cleaning up workspace
2022-07-27 04:33:36 +00:00
@rm -Rvf .cache coverage.txt dist relay
@find . -name ".DS_Store" -exec rm -v {} \;
2022-09-01 20:59:04 +00:00
docker-pull:
docker-compose --project-name ${PROJECT_NAME} -f deployments/docker-compose-test.yaml pull
2022-07-18 03:41:04 +00:00
docker-restart: docker-stop docker-start
docker-start:
docker-compose --project-name ${PROJECT_NAME} -f deployments/docker-compose-test.yaml up -d
docker-stop:
docker-compose --project-name ${PROJECT_NAME} -f deployments/docker-compose-test.yaml down
fmt:
@echo formatting
@go fmt $(shell go list ./... | grep -v /vendor/)
i18n-extract:
2022-08-16 23:08:42 +00:00
goi18n extract -format yaml -outdir web/locales -crowdin
2022-07-27 04:49:47 +00:00
release: clean
goreleaser release
2022-09-01 20:59:04 +00:00
test: tidy fmt
go test -cover ./...
2022-09-01 20:59:04 +00:00
test-ext: tidy fmt
go test --tags=postgres -cover ./...
2022-09-01 20:59:04 +00:00
test-bench-ext: tidy fmt
go test -run=XXX -bench=. --tags=postgres -cover ./...
tidy:
go mod tidy
vendor: tidy
go mod vendor
2022-09-01 20:59:04 +00:00
.PHONY: build-snapshot bun-new-migration clean docker-pull docker-restart docker-start docker-stop fmt i18n-extract release stage-static test test-ext test-bench-ext tidy vendor