-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
40 lines (29 loc) · 1.28 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
SHELL := /bin/bash
.PHONY: help
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%s\033[0m|%s\n", $$1, $$2}' \
| column -t -s '|'
deploy: build infrastructure extract-env deploy-webapp ## Deploy infrastructure and application code
build: ## Build application code
@./scripts/build.sh
infrastructure: check-subscription ## Deploy infrastructure
@./scripts/inf-create.sh
extract-env: extract-env-debug-webapp ## Extract infrastructure.env file from BICEP output
@./scripts/json-to-env.sh < infra_output.json > ./scripts/environments/infrastructure.env
deploy-webapp: extract-env ## Deploys the web app code to Azure App Service
@./scripts/deploy-webapp.sh
extract-env-debug-webapp: ## Extract infrastructure.debug.env file from BICEP output
@./scripts/json-to-env.webapp.debug.sh < infra_output.json > ./scripts/environments/infrastructure.debug.env
# Utils (used by other Makefile rules)
check-subscription:
@./scripts/check-subscription.sh
# CI rules (used by automated builds)
take-dir-ownership:
@sudo chown -R vscode .
destroy-inf: check-subscription
@./scripts/inf-destroy.sh
dev-local:
pip install -r app/requirements.txt
source ./scripts/environments/local.env
streamlit run app/Home.py