Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Move docs generation to Travis & publish to docs.fineuploader.com repo #1769

Merged
merged 25 commits into from
Feb 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 16 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
---
addons:
firefox: "latest"

firefox: latest
sudo: false
language: node_js

node_js:
- '5.0.0'

language: python
python:
- 2.7
env:
global:
- DISPLAY=:99.0
- secure: |-
AZ/GEWzykeSzxh+4r14eKq2dMQnZyEvx99zFnTSp30Ke9QqJP3UQvMdwHzuV
7jqjzHQUYMFl8o7VATMm7WeXiSURmzRP2F51W/v0rfhUyTo9BMiCxHmcI3up
wRMBtB4rJxzk3q5sUR32ucVs/fNlOCMC9M02fnSEijGw4Y+WOhc=
- secure: |-
sEQ0OSwK/9SUqLXB+w8n9oEdFEdLxZTBdMhC5fUrsCjgstfUSSgzYOT9cTFp
awR42/q/Akos2eA8NWx5yU+hRC5rr+oQG5Eio0tzi9+y3a6VXDvgS1h2SaQz
TR/MjA/29gFvV7bnp1LSs2TdZx+NGhLd4zHv01XZ+pQk/nQiW9w=

- DOCS_GH_REF: github.com/FineUploader/docs.fineuploader.com
# fineuploader-docs-bot access token:
- secure: nDapj/IyKyPhcD6eHWqd3YnydZ3AHZDeiuAxgBOiYllSZ5AxlTahET0MX58rRp+8RsvNCZ4EBbEQ2u7I4JoqAwGyx8LhwA0q64ZQ7xI7RSHttgN289Xt4V4NEjUv1ObJgRxfXKqMbpHvU+0CVGdXunB4inconN6dOIXfGsq4HaM=
install:
- . $HOME/.nvm/nvm.sh
- nvm install 5.0.0
- nvm use 5.0.0
- npm install
before_script:
- "sh -e /etc/init.d/xvfb start"
- sh -e /etc/init.d/xvfb start
script:
- npm test
- if [ $TRAVIS_TEST_RESULT -eq 0 ]; then make docs-travis; fi
36 changes: 36 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,42 @@ copy-azure-jquery-dist:
copy-all-dist:
make copy-build-to-dist PUB-SUBDIR=all.fine-uploader

docs: install-docfu
git config --global user.email "[email protected]"
git config --global user.name "fineuploader-docs-bot"
docfu --$(type) "$(type-value)" "FineUploader/fine-uploader" "docfu-temp"
git clone --depth 1 https://github.com/FineUploader/docs.fineuploader.com.git
cp -pR docfu-temp/$(type) docs.fineuploader.com/
(cd docs.fineuploader.com ; git add .)
(cd docs.fineuploader.com ; git diff --cached --quiet || git commit -a -m "update docs for $(type) $(type-value)")
@(cd docs.fineuploader.com ; git push https://$(DOCS_PUSH_ACCESS_TOKEN)@$(DOCS_GH_REF))
make maybe-update-root-docs
.PHONY: docs

maybe-update-root-docs:
ifndef TRAVIS_TAG
ifeq ($(TRAVIS_BRANCH), master)
cp -pR docs.fineuploader.com/branch/master/ docs.fineuploader.com/
endif
endif
.PHONY: maybe-update-root-docs

docs-travis:
ifneq ($(TRAVIS_PULL_REQUEST), false)
@echo skipping docs build - not a non-PR or tag push
else ifdef TRAVIS_TAG
make docs type=tag type-value=$(TRAVIS_TAG)
else
make docs type=branch type-value=$(TRAVIS_BRANCH)
endif
.PHONY: docs-travis

install-docfu:
git clone --depth 1 -b hotfix/cant-generate-docs-from-old-branches https://github.com/FineUploader/docfu
(cd docfu ; python setup.py install)
rm -rf docfu
.PHONY: install-docfu

tag-release:
ifeq ($(simulate), true)
@echo version is $(version)
Expand Down