-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
33 lines (29 loc) · 1.15 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
.PHONY: help
help: ## Display this help screen
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: get-env-non-prod
get-env-non-prod: ## Gets the environment variables from azure keyvault into .env file
az keyvault secret show \
--vault-name mhra-non-prod-02 \
--name import-env \
--query value \
--output tsv | sort | sed '/^$$/d' > .env
.PHONY: set-env-non-prod
set-env-non-prod: ## Takes your current .env file and replaces the keyvault value with the contents of the file
az keyvault secret set \
--vault-name mhra-non-prod-02 \
--name import-env \
--file .env
.PHONY: get-env-production
get-env-production: ## Gets the environment variables from azure keyvault into .env file
az keyvault secret show \
--vault-name mhraproducts4853 \
--name import-env \
--query value \
--output tsv | sort | sed '/^$$/d' > .env
.PHONY: set-env-production
set-env-production: ## Takes your current .env file and replaces the keyvault value with the contents of the file
az keyvault secret set \
--vault-name mhraproducts4853 \
--name import-env \
--file .env