-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathmakefile
57 lines (38 loc) · 1.07 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
50
51
52
53
54
55
56
# makefile for generating/deploying the MARKET Protocol static site
## settings
# name of the AWS profile for deployment of the site to dev
DEV_PROFILE_NAME=marketprotocol-dev-rw
# target AWS bucket for dev deployment
DEV_BUCKET=s3://dev.website.marketprotocol.io
# default make target
default:
pwd
## prerequisites
# node path, if not otherwise set
# NODE_PATH=/usr/local/lib/node_modules/npm/node_modules
# initial installation
install:
npm install
# update npm, if needed
update_npm:
npm i npm
## local deployment
# start the development server (then connect to http://localhost:3000)
start:
npm run start
# build for deployment
build:
npm run build
# test a build locally
serve:
npm run server
## remote deployment
# DEV - display contents of deployed site
ls_dev:
aws s3 --profile $(DEV_PROFILE_NAME) ls $(DEV_BUCKET)
# DEV - remove deployed site from s3 bucket
rm_dev:
aws s3 --profile $(DEV_PROFILE_NAME) rm $(DEV_BUCKET)/dev --recursive
# DEV - deploy site to s3 bucket
deploy_dev:
aws s3 --profile $(DEV_PROFILE_NAME) cp dist/ $(DEV_BUCKET) --recursive