-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
53 lines (40 loc) · 1.58 KB
/
Makefile
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
.DEFAULT_GOAL := help
.PHONY: help
help:
@cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: build
build: ## Build project
dotnet build -f=net6
.PHONY: format
format:
dotnet format
.PHONY: integration-test
integration-test: test=TestCategory=Integration ## Run integration tests
integration-test: single-test
.PHONY: test
test: test=TestCategory=Unit
test: single-test
.PHONY: single-test
single-test: build ## run a single test. usage: "make single-test test=[test name]"
dotnet test ./src/GovukNotify.Tests/GovukNotify.Tests.csproj -f=net6 --no-build -v=n --filter $(test)
.PHONY: build-release
build-release: ## Build release version
dotnet build -c=Release -f=net6
.PHONY: build-package
build-package: build-release ## Build and package NuGet
dotnet pack -c=Release ./src/GovukNotify/GovukNotify.csproj /p:TargetFrameworks=net6 -o=publish
.PHONY: bootstrap-with-docker
bootstrap-with-docker: ## Prepare the Docker builder image
docker build -t notifications-net-client .
.PHONY: build-with-docker
build-with-docker: ## Build with Docker
./scripts/run_with_docker.sh make build
.PHONY: test-with-docker
test-with-docker: build-with-docker ## Test with Docker
./scripts/run_with_docker.sh make test
.PHONY: integration-test-with-docker
integration-test-with-docker: build-with-docker ## Integration test with Docker
./scripts/run_with_docker.sh make integration-test
.PHONY: format-with-docker
format-with-docker: ## Run dotnet format to format the code
./scripts/run_with_docker.sh make format