Skip to content

Commit 2af9b89

Browse files
committedJun 16, 2017
chore] improve publish docs commands.
1 parent 88d2ae1 commit 2af9b89

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed
 

Diff for: ‎Makefile

+19-8
Original file line numberDiff line numberDiff line change
@@ -110,22 +110,33 @@ pre-publish: clean .branch .version deps-project tests-ci build
110110

111111
publish: pre-publish publish-version publish-finished
112112

113-
publish-docs: deps-docs build-docs
113+
init-docs-repo:
114+
@mkdir _book
115+
116+
pre-publish-docs: clean-docs init-docs-repo deps-docs
117+
118+
publish-docs: clean pre-publish-docs build-docs
114119
@echo "[Publishing docs]"
115-
git init _book
116-
cd _book
120+
@make -C _book -f ../Makefile _publish-docs
121+
122+
_publish-docs:
123+
git init .
117124
git commit --allow-empty -m 'update book'
118125
git checkout -b gh-pages
119126
touch .nojekyll
120127
git add .
121128
git commit -am 'update book'
122129
git push git@github.com:reactjs/react-modal gh-pages --force
123-
cd ..
124130

125131
publish-all: publish publish-docs
126132

127-
clean-sources:
128-
@rm -rf lib/* dist/* _book
133+
clean-docs:
134+
@rm -rf _book
135+
136+
clean-coverage:
137+
@rm -rf ./coverage/*
138+
139+
clean-build:
140+
@rm -rf .version .branch lib/*
129141

130-
clean: clean-sources
131-
@rm -rf .version .branch ./coverage/*
142+
clean: clean-build clean-docs clean-coverage

0 commit comments

Comments
 (0)
Please sign in to comment.