-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (35 loc) · 1.14 KB
/
Makefile
File metadata and controls
43 lines (35 loc) · 1.14 KB
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
SHELL := /bin/bash
# 変数
SCRATCH_DIR := scratch
SCRATCH_VM := $(SCRATCH_DIR)/scratch-vm
SCRATCH_GUI := $(SCRATCH_DIR)/scratch-gui
LINE_API := line-fastAPI
SCRATCH_DB := scratch-db
.PHONY: install reset init-submodules install-scratch install-line-fastapi install-db
install: reset init-submodules install-scratch install-line-fastapi install-db
reset:
@echo -e "\e[41m Resetting working directories... \e[m"
@rm -rf $(SCRATCH_VM) $(SCRATCH_GUI) $(LINE_API) $(SCRATCH_DB)
init-submodules:
@echo -e "\e[44m Initializing git submodules... \e[m"
@git submodule update --init --recursive
install-scratch:
@echo -e "\e[44m Installing Scratch (vm + gui)... \e[m"
cd $(SCRATCH_VM) \
&& npm install \
&& npm link
cd $(SCRATCH_GUI) \
&& npm install \
&& npm link scratch-vm
install-line-fastapi:
@echo -e "\e[44m Installing line-fastAPI... \e[m"
cd $(LINE_API) \
&& touch .env \
&& echo "LINE_CHANEL_API_KEY='your_api_key'" > .env \
&& echo "LINE_USER_ID='your_user_id'" >> .env \
&& python3 -m venv venv \
&& source venv/bin/activate \
&& pip install -r requirements.txt \
&& deactivate
install-db:
@echo -e "\e[44m Installing scratch-db... \e[m"