-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (19 loc) · 773 Bytes
/
Makefile
File metadata and controls
27 lines (19 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
COMPOSE_FILE := infra/local/docker-compose.yml
.PHONY: db-up db-down migrate serve sync refresh contract
db-up:
sg docker -c "docker compose -f $(COMPOSE_FILE) up -d"
db-down:
sg docker -c "docker compose -f $(COMPOSE_FILE) down -v"
migrate:
go run ./cmd/ghreplica migrate up
serve:
go run ./cmd/ghreplica serve
sync:
@test -n "$(REPO)" || (echo "usage: make sync REPO=owner/repo" >&2; exit 1)
go run ./cmd/ghreplica sync repo $(REPO)
refresh:
@test -n "$(REPO)" || (echo "usage: make refresh REPO=owner/repo" >&2; exit 1)
go run ./cmd/ghreplica refresh repo $(REPO)
contract:
@test -n "$(REPO)" || (echo "usage: make contract REPO=owner/repo" >&2; exit 1)
GHREPLICA_CONTRACT_REPO=$(REPO) go test ./internal/contract -run TestGitHubCompatibilitySubset -v