Skip to content

Commit

Permalink
chore; set up legacy / master doc generation
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Mar 25, 2015
1 parent 3846944 commit c339edd
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions Makefile
Expand Up @@ -2,7 +2,8 @@
DOCS_ = $(shell find lib/ -name '*.js')
DOCS = $(DOCS_:.js=.json)
DOCFILE = docs/source/_docs
STABLE_BRANCH = 3.8.x
STABLE_BRANCH = master
LEGACY_BRANCH = 3.8.x

test:
@MONGOOSE_DISABLE_STABILITY_WARNING=1 ./node_modules/.bin/mocha $(T) --async-only test/*.test.js
Expand All @@ -13,10 +14,8 @@ test-short:
test-long:
@MONGOOSE_DISABLE_STABILITY_WARNING=1 ./node_modules/.bin/mocha $(T) -g LONG --async-only test/**/*.test.js

docs: ghpages merge_stable docclean gendocs
docs_all: docs_unstable docs
docs_from_current_branch: docclean gendocs
docs_unstable: master docclean_unstable gendocs copytmp gitreset ghpages copyunstable
docs: ghpages docclean gendocs
docs_legacy: legacy docclean_legacy gendocs copytmp gitreset ghpages copylegacy

gendocs: $(DOCFILE)

Expand All @@ -36,15 +35,15 @@ merge_stable:
ghpages:
git checkout gh-pages

master:
git checkout master
legacy:
git checkout $(LEGACY_BRANCH)

docclean:
rm -f ./docs/*.{1,html,json}
rm -f ./docs/source/_docs

docclean_unstable:
rm -rf ./docs/unstable/*
docclean_legacy:
rm -rf ./docs/$(LEGACY_BRANCH)/*
rm -f ./docs/source/_docs

copytmp:
Expand All @@ -61,9 +60,9 @@ gitreset:
git checkout -- ./docs
git checkout -- ./index.html

copyunstable:
mkdir -p ./docs/unstable
cp -R ./tmp/* ./docs/unstable/
copylegacy:
mkdir -p ./docs/$(LEGACY_BRANCH)
cp -R ./tmp/* ./docs/$(LEGACY_BRANCH)/
rm -rf ./tmp

.PHONY: test test-short test-long ghpages site docs docclean gendocs docs_from_master docs_unstable master copytmp copyunstable gitreset docclean_unstable
Expand Down

0 comments on commit c339edd

Please sign in to comment.