Commit 18ce6afd authored by Francois Ledoyen's avatar Francois Ledoyen
Browse files

maint: replace bash scripts by makefiles

parent 17d371af
Loading
Loading
Loading
Loading

Makefile

0 → 100644
+24 −0
Original line number Diff line number Diff line
JS_LIB="./tagthunder/javascript/"
PPT_CRAWLER=${JS_LIB}/puppeteer-crawler/


build-crawler:
	$(MAKE) -C ${PPT_CRAWLER} build

install: 
	poetry install
	$(MAKE) build-crawler

run-crawler:
	$(MAKE) -C ${PPT_CRAWLER} run

run-api:
	poetry run tagthunder-api

run:
	screen -S tagthunder-crawler -d -m $(MAKE) run-crawler
	screen -S tagthunder-api -d -m $(MAKE) run-api


dev: install
	poetry install with dev

install.sh

deleted100644 → 0
+0 −21
Original line number Diff line number Diff line
#!/bin/bash

yellow=`tput setaf 3`;
green=`tput setaf 2`;
clear=`tput sgr0`;

echo "${yellow}Install python3.9, docker, node.js${clear}"
sudo apt-get update
sudo apt-get install python3.9 
sudo apt-get install node
sudo apt-get install docker

echo "${yellow}Create virtual env"${clear}
python3.9 -m pip install virtualenv
virtualenv --python=$(which python3.9) venv
. $PWD/venv/bin/activate

echo "${yellow}Install requirements${clear}"
pip install -r requirements.txt

+15 −0
Original line number Diff line number Diff line
HTML_AUG_DIR="../html-augmentation/"
IMAGE_NAME="tagthunder-crawler"

run:
	docker run -ti -p 8080:8080 tagthunder-crawler

build:
	@npm install .
	@npm pack $(HTML_AUG_DIR) --pack-destination ./node_modules
	@npm install .
	docker build . -t $(IMAGE_NAME)

clean:
	rm ./node_modules -rf
	rm $(HTML_AUG_DIR)/*.tar.gz
+0 −0

File mode changed from 100644 to 100755.