-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
46 lines (36 loc) · 2.13 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
.install-deps: ## install all dependencies
@bash ./devops/scripts/utils/install-dependencies.sh
dev: .install-deps ## start debugging in docker compose microservices (auto reload)
@docker compose -f docker-compose.dev.yaml up --abort-on-container-exit backend frontend reverse-proxy
build-full: .install-deps ## build current plattform
@bash ./devops/scripts/build-service/binary.sh
local-release: .install-deps ## build all app versions locally (via goreleaser)
@bash ./devops/scripts/utils/local-release.sh
test-be: ## run golang tests
@docker compose -f docker-compose.dev.yaml up --abort-on-container-exit postgres backend-tests
test-fe: ## run sveltekit tests
@docker compose -f docker-compose.dev.yaml up --abort-on-container-exit frontend-tests
build-dockerfile-binary: ## build one dockerimage that contains everything
@bash ./devops/scripts/build-container/binary.sh
build-dockerfile-frontend: ## build the frontend microservice
@bash ./devops/scripts/build-container/frontend.sh
build-dockerfile-backend: ## build the backend microservice
@bash ./devops/scripts/build-container/backend.sh
help: ## print our all commands to commandline
@echo "\033[34m"
@echo " SvelteKit + Golang Example"
@echo " ------------------------------------"
@echo " github: @uvulpos"
@echo "\033[0m"
@echo ""
@echo "\033[33mDevelopment Commands:\033[0m"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | grep -B0 -E 'dev'
@echo ""
@echo "\033[33mBuild Commands:\033[0m"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | grep -B0 -E 'build-full|local-release'
@echo ""
@echo "\033[33mDocker Commands:\033[0m"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | grep -B0 -E 'build-dockerfile-'
@echo ""
@echo "\033[33mTest Commands:\033[0m"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | grep -B0 -E 'test-be|test-fe'