Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit f23cda3

Browse files
committed
Merge branch 'hotfix/docs-check'
Docs build-chain
2 parents 9de93f9 + 0d70ba7 commit f23cda3

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ matrix:
2121
- php: 5.5
2222
env:
2323
- EXECUTE_CS_CHECK=true
24+
- EXECUTE_DOC_CHECK=true
2425
- php: 5.6
2526
env:
2627
- EXECUTE_TEST_COVERALLS=true
@@ -36,15 +37,20 @@ notifications:
3637
before_install:
3738
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
3839
- composer self-update
40+
- if [[ $EXECUTE_DOC_CHECK == 'true' ]]; then composer require --dev --no-update phly/bookdown2mkdocs ; fi
3941
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi
4042

4143
install:
4244
- travis_retry composer install --no-interaction --ignore-platform-reqs
4345

46+
before_script:
47+
- if [[ $EXECUTE_DOC_CHECK == 'true' ]]; then cp mkdocs.yml mkdocs.yml.orig ; fi
48+
4449
script:
4550
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
4651
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi
4752
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs ; fi
53+
- if [[ $EXECUTE_DOC_CHECK == 'true' ]]; then make mkdocs ; diff mkdocs.yml mkdocs.yml.orig ; return $? ; fi
4854

4955
after_script:
5056
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi

Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# zend-expressive Makefile
2+
#
3+
# Primary purpose is for generating the mkdocs.yml from the bookdown.json
4+
# sources.
5+
#
6+
# Configurable variables:
7+
# - BOOKDOWN2MKDOCS - specify the path to the executable; defaults to
8+
# ./vendor/bin/bookdown2mkdocs
9+
#
10+
# Available targets:
11+
# - mkdocs - regenerate mkdocs.yml
12+
# - all - synonym for mkdocs target
13+
14+
BOOKDOWN2MKDOCS?=$(CURDIR)/vendor/bin/bookdown2mkdocs.php
15+
16+
.PHONY : all mkdocs bookdown2mkdocs
17+
18+
all : mkdocs
19+
20+
mkdocs :
21+
@echo "Generating mkdocs.yml from bookdown.json..."
22+
-$(BOOKDOWN2MKDOCS) convert --site-name=zend-code --repo-url=https://github.com/zendframework/zend-code --copyright-url=http://www.zend.com/ --copyright-author="Zend Technologies USA Inc."
23+
@echo "[DONE] Generating mkdocs.yml from bookdown.json"

doc/book/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../README.md

mkdocs.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
docs_dir: doc/book
2+
site_dir: doc/html
3+
pages:
4+
- index.md
5+
- zend.code.generator.introduction.md
6+
- zend.code.generator.reference.md
7+
- zend.code.generator.examples.md
8+
- zend.code.migrate.2.to.3.md
9+
site_name: zend-code
10+
site_description: Zend\Code
11+
repo_url: 'https://github.com/zendframework/zend-code'
12+
copyright: 'Copyright (c) 2016 <a href="http://www.zend.com/">Zend Technologies USA Inc.</a>'

0 commit comments

Comments
 (0)