Skip to content

Commit efaec81

Browse files
committed
ci: add HOW_STATUS and update Travis template doc
1 parent 36be8e4 commit efaec81

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

how.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
HOW_STATUS=0
2+
13
# NOTE redirections have to be done this way because:
24
# 1. Travis doesn't deploy symlinks (https://github.com/travis-ci/dpl/issues/912)
35
# 2. GitHub Pages uses symlinks to change the displayed page but the URL is not
@@ -43,5 +45,7 @@ how-install() {
4345
}
4446

4547
how-generate() {
46-
quickdop -f $HOW_DOC $HOW_OUT -t json -c $HOW_CONFIG -viu
48+
if ! quickdop -f $HOW_DOC $HOW_OUT -t json -c $HOW_CONFIG -viu; then
49+
HOW_STATUS=1
50+
fi
4751
}

travis-template.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
language: c
22

3-
env:
4-
- HOW_DOC=doc # replace "doc" with the name of your documentation directory
5-
- HOW_CONFIG=how.json # replace "how.json" with the name of your file
6-
- HOW_OUT=_doc # replace "_doc" with the name of the build directory you like (*)
3+
# replace HOW_DOC with the name of your documentation directory
4+
# replace HOW_CONFIG with the name of your configuration file
5+
# replace HOW_OUT with the name of the build directory you like (*)
6+
env: HOW_DOC=doc HOW_CONFIG=how.json HOW_OUT=_doc
77

88
install:
99
- wget https://ocsigen.org/how.sh
@@ -12,8 +12,15 @@ install:
1212

1313
script:
1414
- how-generate
15+
# You can add here your redirections. There are two types of redirections:
16+
# * Simple redirections from one page to another. Use `how-redirect`.
17+
# * Manual redirections from one manual version to another (likely more recent). Use `how-redirect-manual`.
18+
# The variable HOW_LATEST contains the number of the more recent version that is not `dev`.
19+
# The other environment variables are also accessible.
20+
# Examples:
1521
# - how-redirect "$HOW_LATEST/manual/intro" $HOW_OUT/index.html # redirect index.html to the intro of the latest version
1622
# - how-redirect-manual 2.4.0 1.1.2 # redirect v1.1.2 manual to v2.4.0 manual
23+
- exit $HOW_STATUS
1724

1825
deploy:
1926
provider: pages

0 commit comments

Comments
 (0)