Merge pull request #448 from nodejs/doctoc-check

Refactor .travis.yml and add doctoc check
This commit is contained in:
Peter Dave Hello 2017-07-13 06:00:26 +08:00 committed by GitHub
commit fe96ba0be4
2 changed files with 28 additions and 14 deletions

View File

@ -3,20 +3,30 @@ sudo: required
services:
- docker
addons:
apt:
sources:
- debian-sid
packages:
- shellcheck
script:
- shellcheck *.sh
- ./test-build.sh $NODE_VERSION
- if [ "true" = "${SHELLCHECK-}" ]; then shellcheck *.sh ; fi
- if [ -n "${NODE_VERSION-}" ]; then ./test-build.sh $NODE_VERSION ; fi
- if [ "true" = "${DOCTOCCHECK-}" ]; then
nvm install node &&
npm i -g doctoc &&
cp README.md README.md.tmp &&
doctoc --title='## Table of Contents' --github README.md &&
diff -q README.md README.md.tmp;
fi
env:
matrix :
- NODE_VERSION: '4.8'
- NODE_VERSION: '6.11'
- NODE_VERSION: '7.10'
- NODE_VERSION: '8.1'
- DOCTOCCHECK: true
- NODE_VERSION: '4.8'
- NODE_VERSION: '6.11'
- NODE_VERSION: '7.10'
- NODE_VERSION: '8.1'
matrix:
include:
env: SHELLCHECK=true
addons:
apt:
sources:
- debian-sid
packages:
- shellcheck

View File

@ -7,6 +7,8 @@
The official Node.js docker image, made with love by the node community.
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of Contents
- [What is Node.js?](#what-is-nodejs)
@ -30,6 +32,8 @@ The official Node.js docker image, made with love by the node community.
- [Docker Working Group Members](#docker-working-group-members)
- [Docker Working Group Collaborators](#docker-working-group-collaborators)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## What is Node.js?
Node.js is a platform built on Chrome's JavaScript runtime for easily building