File tree 3 files changed +50
-5
lines changed
3 files changed +50
-5
lines changed Original file line number Diff line number Diff line change 26
26
@echo jq version: ` $( JQ) --version` " ($( JQ) )"
27
27
@echo react-modal version: $(VERSION )
28
28
29
- deps :
29
+ deps : deps-project deps-docs
30
+
31
+ deps-project :
30
32
@[[ ! -z " $( YARN) " ]] && $(YARN ) install || $(NPM ) install
33
+
34
+ deps-docs :
31
35
@gitbook install
32
36
33
37
# Rules for development
52
56
53
57
build-docs :
54
58
@echo " [Building documentation]"
55
- @rm -rf _book/ *
59
+ @rm -rf _book
56
60
@gitbook build -g reactjs/react-modal
57
61
58
62
version :
@@ -78,12 +82,12 @@ publish-version: release-commit release-tag
78
82
npm publish
79
83
@rm .version
80
84
81
- publish : version build publish-version publish-finished
85
+ publish : version deps-project build publish-version publish-finished
82
86
83
- publish-docs : build-docs
87
+ publish-docs : deps-docs build-docs
84
88
@echo " [Publishing docs]"
89
+ git init _book
85
90
cd _book
86
- git init
87
91
git commit --allow-empty -m ' update book'
88
92
git checkout -b gh-pages
89
93
touch .nojekyll
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ NODE=` which node`
4
+ NPM=` which npm`
5
+ YARN=` which yarn`
6
+ JQ=` which jq`
7
+
8
+ echo $NODE $NPM $YARN $JQ
9
+
10
+ if [[ ! -z " $NODE " ]]; then
11
+ echo " Node is installed and it's version is: ` $NODE --version` "
12
+ else
13
+ echo " Please, install node.js."
14
+ exit 1
15
+ fi
16
+
17
+ if [[ ! -z " $NPM " ]]; then
18
+ echo " NPM is installed and it's version is: ` $NPM --version` "
19
+ else
20
+ echo " Please, install npm."
21
+ exit 1
22
+ fi
23
+
24
+ if [[ ! -z " $YARN " ]]; then
25
+ echo " yarn is installed and it's version is: ` $YARN --version` "
26
+ else
27
+ echo " yarn is optional."
28
+ fi
29
+
30
+ if [[ ! -z " $JQ " ]]; then
31
+ echo " jq is installed and it's version is: ` $JQ --version` "
32
+ else
33
+ echo " jq is optional and used only for publish purpose."
34
+ fi
35
+
36
+ npm install -g gitbook-cli
Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ echo "Current version is: $1"
10
10
11
11
read -p " Bump to: " NEW_VERSION
12
12
13
+ if [[ ! -z " $( git tag -l | grep v${NEW_VERSION} ) " ]]; then
14
+ echo " Tag $NEW_VERSION already exists."
15
+ exit 1
16
+ fi
17
+
13
18
FILES=" package.json bower.json"
14
19
15
20
for F in $FILES ; do
You can’t perform that action at this time.
0 commit comments