forked from lutzroeder/netron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
94 lines (78 loc) · 2.71 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
.PHONY: test
build: clean lint build_python build_electron
publish: clean lint publish_github_electron publish_python publish_github_pages publish_cask
install:
rm -rf ./node_modules
rm -rf ./package-lock.json
npm install
clean:
rm -rf ./build
reset:
rm -rf ./build
rm -rf ./node_modules
rm -rf ./third_party
rm -rf ./package-lock.json
update:
@[ -d node_modules ] || npm install
@./tools/caffe sync schema
@./tools/coreml sync install schema
@./tools/chainer sync
@./tools/cntk sync schema
@./tools/darknet sync
@./tools/dl4j sync
@./tools/keras sync install metadata
@./tools/mnn sync install schema
@./tools/mlnet sync metadata
@./tools/mxnet sync metadata
@./tools/ncnn sync
@./tools/onnx sync install schema metadata
@./tools/paddle sync schema
@./tools/pytorch sync install schema metadata
@./tools/sklearn sync install metadata
@./tools/tf sync install schema metadata
@./tools/tflite sync install schema
@./tools/torch sync
build_python:
@[ -d node_modules ] || npm install
python3 ./setup.py build --version
build_electron:
@[ -d node_modules ] || npm install
npx electron-builder install-app-deps
npx electron-builder --mac --linux --win
lint:
@[ -d node_modules ] || npm install
npx eslint src/*.js test/*.js
test:
@[ -d node_modules ] || npm install
node ./test/test.js
start:
@[ -d node_modules ] || npm install
npx electron .
publish_python:
@[ -d node_modules ] || npm install
python3 ./setup.py build --version bdist_wheel
python3 -m pip install --user keyring
python3 -m pip install --user twine
twine upload build/dist/*
publish_github_electron:
@[ -d node_modules ] || npm install
npx electron-builder install-app-deps
npx electron-builder --mac --linux --win --publish always
publish_github_pages:
@[ -d node_modules ] || npm install
python3 ./setup.py build --version
rm -rf ./build/gh-pages
git clone [email protected]:lutzroeder/netron.git ./build/gh-pages --branch gh-pages
rm -rf ./build/gh-pages/*
cp -R ./build/lib/netron/* ./build/gh-pages/
rm -rf ./build/gh-pages/*.py*
@export PACKAGE_VERSION=`node -pe "require('./package.json').version"`; \
sed -i -e "s/<!-- meta -->/<meta name='version' content='$$PACKAGE_VERSION' \/>/g" ./build/gh-pages/index.html
git -C ./build/gh-pages add --all
git -C ./build/gh-pages commit --amend --no-edit
git -C ./build/gh-pages push --force origin gh-pages
publish_cask:
@curl -H "Authorization: token $(GITHUB_TOKEN)" https://api.github.com/repos/Homebrew/homebrew-cask/forks -d ''
@export PACKAGE_VERSION=`node -pe "require('./package.json').version"`; \
cask-repair --cask-version $$PACKAGE_VERSION --blind-submit netron
@curl -H "Authorization: token $(GITHUB_TOKEN)" -X "DELETE" https://api.github.com/repos/lutzroeder/homebrew-cask