-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (23 loc) · 947 Bytes
/
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
build: z_build ## Run stat gathering script
run: z_run ## Run
clean: z_clean ## Clean
deploy: z_deploy ## Deploy
define log
@echo "🔺 $(1)"
endef
RUN_DATE=$(shell date)
z_build: ## ∟ build metrics backend and link pre-requisites [private]
$(call log, Cloning IQSS/iqss-metrics-dashboard.git)
git clone [email protected]:IQSS/iqss-metrics-dashboard.git
ln -sf iqss-metrics-dashboard/assets/data out
test -f ./out/main_metrics.tsv || echo 'group metric title value unit icon color url' > ./out/main_metrics.tsv
z_clean: ## ∟ clean artifacts metrics backend and link pre-requisites [private]
rm -rfv iqss-metrics-dashboard
rm -rfv out
z_deploy: ## ∟ Run deploy
cd out && \
git diff --exit-code && echo "No changes to data." || git add -A && \
git commit -a -m "Automated push of new data by iqss-metrics-backend on $(RUN_DATE)" && \
git push origin master
z_run: ## ∟ Run backend
pipenv run python main.py