Skip to content

Commit 5f2cde9

Browse files
committed
v2.0.3
TravisCI overhaul
1 parent e609053 commit 5f2cde9

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.travis.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
language: generic
2+
3+
branches:
4+
only:
5+
- master
6+
7+
before_install:
8+
- sudo apt-get -qq update
9+
- sudo apt-get install -y libxml2-utils
10+
11+
script:
12+
# Merge single ODD files to one monolithic ODD
13+
- xmllint --xinclude src/mpm.odd > mpm-monolithic.odd
14+
15+
# Get RNG file
16+
- curl -s -o mpm_rng.zip -F upload=@mpm-monolithic.odd https://oxgarage-humanum.tei-c.org/ege-webservice/Conversions/ODD%3Atext%3Axml/ODDC%3Atext%3Axml/relaxng%3Aapplication%3Axml-relaxng/conversion
17+
- unzip -p mpm_rng.zip document.rng >mpm.rng
18+
19+
# Get DTD file
20+
#- curl -s -o mpm_dtd.zip -F upload=@mpm-monolithic.odd https://oxgarage-humanum.tei-c.org/ege-webservice/Conversions/ODD%3Atext%3Axml/ODDC%3Atext%3Axml/dtd%3Aapplication%3Axml-dtd/conversion
21+
#- unzip -p mpm_dtd.zip document.dtd >mpm.dtd
22+
23+
# Get XSD file
24+
- curl -s -o mpm_xsd.zip -F upload=@mpm-monolithic.odd https://oxgarage-humanum.tei-c.org/ege-webservice/Conversions/ODD%3Atext%3Axml/ODDC%3Atext%3Axml/xsd%3Aapplication%3Axml-xsd/conversion
25+
- unzip -p mpm_xsd.zip document.xsd >mpm.xsd
26+
27+
# Build docs for GitHub Pages
28+
- mkdir -p docs
29+
- curl -s -o docs.zip -F upload=@mpm-monolithic.odd https://oxgarage-humanum.tei-c.org/ege-webservice/Conversions/ODD%3Atext%3Axml/ODDC%3Atext%3Axml/TEI%3Atext%3Axml/xhtml%3Aapplication%3Axhtml%2Bxml/conversion
30+
- unzip docs.zip -d docs
31+
- mv docs/document.html docs/index.html
32+
- sed -i -e 's/href="http:/href="https:/g' docs/index.html
33+
34+
# Set git tag for release
35+
- export VERSION=`xmllint --xpath 'string(//*[local-name()="edition"]/@n)' src/mpm.odd`
36+
- export DATE=`date +'%Y-%m-%d_%H-%M-%S'`
37+
- git tag "v${VERSION}_${DATE}"
38+
39+
deploy:
40+
- provider: releases
41+
api_key: $GITHUB_TOKEN
42+
skip_cleanup: true
43+
on:
44+
branch: master
45+
name: "MPM v$VERSION"
46+
file:
47+
- "mpm.rng"
48+
- "mpm.dtd"
49+
- "mpm.xsd"
50+
- "mpm-monolithic.odd"
51+
- "docs.zip"
52+
53+
- provider: pages
54+
github_token: $GITHUB_TOKEN
55+
skip_cleanup: true
56+
on:
57+
branch: master
58+
keep_history: true
59+
target_branch: gh-pages
60+
local_dir: docs

0 commit comments

Comments
 (0)