forked from trezor/trezor.js
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
53 lines (39 loc) · 1005 Bytes
/
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
flow: node_modules
`npm bin`/flow check src/
eslint:
cd src/; `npm bin`/eslint .
git-ancestor:
git fetch origin
git merge-base --is-ancestor origin/master master
yarn:
yarn
node_modules:
yarn
clean:
rm -rf lib
rm -rf dist
build: clean node_modules
cp -r src/ lib
find lib/ -type f ! -name '*.js' | xargs -I {} rm {}
find lib/ -name '*.js' | xargs -I {} mv {} {}.flow
`npm bin`/babel src --out-dir lib
.version-%: .move-in-%
npm install
make build-$* || ( make .cleanup-$* && false )
`npm bin`/bump ${TYPE} || ( make .cleanup-$* && false )
make build-$* || ( make .cleanup-$* && false )
npm publish || ( make .cleanup-$* && false )
make .cleanup-$*
.version: yarn git-clean git-ancestor flow eslint build
npm version ${TYPE}
npm publish
git push
git push --tags
version-patch: TYPE = patch
version-patch: .version
version-minor: TYPE = minor
version-minor: .version
version-major: TYPE = major
version-major: .version
git-clean:
test ! -n "$$(git status --porcelain)"