Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (44 loc) · 1.47 KB
/
Copy pathMakefile
File metadata and controls
54 lines (44 loc) · 1.47 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.DEFAULT_GOAL := help
help:
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
OS := $(shell uname)
GENERATE_PROTOS_FLAG=
EVENTSTORE_DOCKER_REGISTRY ?= docker.eventstore.com/eventstore-ce
EVENTSTORE_DOCKER_IMAGE ?= eventstoredb-ce
EVENTSTORE_DOCKER_TAG ?= latest
.PHONY: build
build: ## Build based on the OS.
ifeq ($(OS),Linux)
./build.sh $(GENERATE_PROTOS_FLAG)
else ifeq ($(OS),Darwin)
./build.sh $(GENERATE_PROTOS_FLAG)
else
pwsh.exe -File ".\build.ps1" $(GENERATE_PROTOS_FLAG)
endif
.PHONY: generate-protos-and-build
generate-protos-and-build: ## Generate protobuf and gRPC files while building.
ifeq ($(OS),Linux)
$(MAKE) build GENERATE_PROTOS_FLAG=--generate-protos
else ifeq ($(OS),Darwin)
$(MAKE) build GENERATE_PROTOS_FLAG=--generate-protos
else
$(MAKE) build GENERATE_PROTOS_FLAG=-generateProtos
endif
.PHONY: start-kurrentdb
start-kurrentdb:
@docker --version
@docker compose up -d --wait
@docker compose ps
.PHONY: stop-kurrentdb
stop-kurrentdb:
@docker compose down -v --remove-orphans
.PHONY: start-oauth
start-oauth: ## Start the OAuth stack (Keycloak + an OAuth KurrentDB node). Requires KURRENTDB_LICENSE_KEY.
@docker compose -f docker-compose.oauth.yml up -d --wait
@docker compose -f docker-compose.oauth.yml ps
.PHONY: stop-oauth
stop-oauth:
@KURRENTDB_LICENSE_KEY=unset docker compose -f docker-compose.oauth.yml down -v --remove-orphans
.PHONY: test
test: ## Run tests
go test --count=1 -v ./test