forked from trezor/connect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
73 lines (61 loc) · 2.24 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
clean:
rm -rf build/
# manually: goto ./submodules/trezor-common; git checkout master; git pull
submodules:
git submodule update --remote --merge --recursive
# docker build for connect.trezor.io
build:
./scripts/docker-build.sh
# docker build for npm
build-npm:
./scripts/docker-build.sh npm
publish-npm:
cd ./npm && npm publish
# local file system build
build-connect:
yarn install
yarn run build
yarn run build:inline
cp build/js/trezor-connect.*.js build/trezor-connect.min.js
cp robots.txt build/robots.txt
# Build test
build-test:
make build-connect
sed -i '' -e 's/connect.trezor.io/sisyfos.trezor.io\/connect/g' ./build/js/iframe.*.js
rsync -avz --delete -e ssh ./build/* [email protected]:~/sisyfos/www/connect
# Version bump
version-patch:
yarn bump --patch --grep ./README.md ./src/js/data/ConnectSettings.js
version-minor:
yarn bump --minor --grep ./README.md ./src/js/data/ConnectSettings.js
version-major:
yarn bump --major --grep ./README.md ./src/js/data/ConnectSettings.js
# Sync build
sync-%:
# Before first use: Install awscli (pip install awscli)
# Configure access credentials (aws configure), region is "eu-central-1"
aws s3 sync --delete --cache-control 'public, max-age=3600' build/ s3://connect.trezor.io/$*/
# Build messages.json from protobuf
protobuf:
make -C ./submodules/trezor-common/protob combine
./node_modules/.bin/proto2js ./submodules/trezor-common/protob/combined.proto > ./src/data/messages.I.json
# Build coin definitions
coins:
# make submodules
./submodules/trezor-common/tools/cointool.py dump -p -d connect -e icon -e cooldown -e github -e key -e maintainer -e uri_prefix -e version_group_id -e website -e links -e duplicate -o ./src/data/coins.json
eth-tokens:
./submodules/trezor-common/tools/cointool.py dump -p -I erc20 -f chain=eth -e chain -e chain_id -e ens_address -e key -e logo -e social -e support -e type -e website -e shortcut -o ./src/data/ethereumTokens.json
.DEFAULT_GOAL:= default
default:
@echo "Build:"
@echo "git checkout to version branch v[X]"
@echo " make build"
@echo "Sync:"
@echo "s3 sync version build to server (connect.trezor.io)"
@echo " make sync-[X]"
@echo " "
@echo " "
@echo "NPM:"
@echo " make build-npm"
@echo "Publish NPM:"
@echo " make publish-npm"