-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
40 lines (31 loc) · 1.13 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
.PHONY: build cibuild publish test prettier
prettier:
./node_modules/.bin/prettier --write "src/**/*.js"
testcrawl:
NODE_ENV=test \
CRAWL_HOST="example.com" \
./node_modules/jasmine/bin/jasmine.js spec/crawlSpec.js
testintegration:
DEBUG=prerendercloud,prerendercloudserver \
NODE_ENV=test \
PRERENDER_SERVICE_URL="https://service.prerender.cloud" \
./node_modules/jasmine/bin/jasmine.js spec/integrationSpec.js
test: testcrawl testintegration
cibuild:
rm -rf publish && mkdir publish && cp -r src publish/
cp README.md package.json package-lock.json publish/
npmpublish: build
npm publish publish
dockerbuild: build
docker build -t prerendercloud/webserver -t prerendercloud/webserver:latest -t prerendercloud/webserver:0.8.5 .
dockerpush: dockerbuild
docker push prerendercloud/webserver
docker push prerendercloud/webserver:latest
docker push prerendercloud/webserver:0.8.5
# instructions to publish npm and docker:
# 1. run tests, commit changes
# 2. modify package.json version
# 3. modify Docker tag here in Makefile in dockerbuild and dockerpublish
# 4. run `make publish`
# 5. run `make dockerpush`
publish: npmpublish dockerpush