-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
49 lines (39 loc) · 1 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
41
42
43
44
45
46
47
48
49
all: deploy
artifacts: artifacts/puppeteer.zip artifacts/python.zip artifacts/browse-text.zip artifacts/github.zip artifacts/pdf.zip artifacts/youtube.zip
artifacts/puppeteer.zip: %.zip: package.json package-lock.json
rm -rf $@ $*
mkdir -p $*/nodejs/node_modules
cp $^ $*/nodejs
npm install --prefix $*/nodejs
cd $* && zip -r ../$(@F) .
artifacts/python.zip: %.zip: requirements.txt
rm -rf $@ $*
mkdir -p $*
python3 -m venv $*/python
$*/python/bin/pip install -r $<
cd $* && zip -r ../$(@F) .
artifacts/browse-text.zip: %.zip: browse-text.mjs
rm -rf $@ $*
mkdir -p $*
cp $^ $*
cd $* && zip -r ../$(@F) .
artifacts/github.zip: %.zip: github.py
rm -rf $@ $*
mkdir -p $*
cp $^ $*
cd $* && zip -r ../$(@F) .
artifacts/pdf.zip: %.zip: pdf.py
rm -rf $@ $*
mkdir -p $*
cp $^ $*
cd $* && zip -r ../$(@F) .
artifacts/youtube.zip: %.zip: youtube.py
rm -rf $@ $*
mkdir -p $*
cp $^ $*
cd $* && zip -r ../$(@F) .
deploy: artifacts
sls deploy
clean:
rm -rf artifacts
.PHONY: all artifacts deploy clean