aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml57
1 files changed, 57 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000..92c6eff75
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,57 @@
+os: osx
+language: generic
+cache:
+ timeout: 1000
+ directories:
+ - "$HOME/.stack/"
+ - ".stack-work/"
+branches:
+ only:
+ - /rc\/.*/
+install:
+- set -e
+- ulimit -n 4096
+- brew install haskell-stack
+- which stack
+- stack --version
+- stack setup
+- stack exec -- ghc --version
+- |
+ export VERSION=$(grep '^[Vv]ersion:' pandoc.cabal | awk '{print $$2;}')
+ export BASEDIR=$(pwd)
+ export ARTIFACTS=${BASEDIR}/macos-release-candidate
+ export RESOURCES=${ARTIFACTS}/Resources
+ export ROOT=${ARTIFACTS}/pandoc
+ export DEST=${ROOT}/usr/local
+ export ME=$(whoami)
+ export BASE=pandoc-$VERSION
+ mkdir -p ${ARTIFACTS}
+ mkdir -p ${RESOURCES}
+ mkdir -p ${DEST}/bin
+ mkdir -p ${DEST}/share/man/man1
+ stack build --dependencies-only pandoc pandoc-citeproc
+ stack build pandoc pandoc-citeproc
+ for f in $(find .stack-work/install -name 'pandoc*' -perm +001 -type f); do cp $f ${DEST}/bin/; done
+ strip ${DEST}/bin/pandoc
+ strip ${DEST}/bin/pandoc-citeproc
+ cp man/pandoc.1 ${DEST}/share/man/man1/pandoc.1
+ ${DEST}/bin/pandoc-citeproc --man > \
+ $DEST/share/man/man1/pandoc-citeproc.1
+ ${DEST}/bin/pandoc -t html5 -s COPYING.md -Vpagetitle=License \
+ -o ${RESOURCES}/license.html
+ chown -R $ME:staff ${ROOT}
+ sed -e "s/PANDOCVERSION/${VERSION}/" macos/distribution.xml.in > ${ARTIFACTS}/distribution.xml
+ cp macos/Makefile ${ARTIFACTS}/
+ echo ${VERSION} > ${ARTIFACTS}/version.txt
+deploy:
+ on:
+ branch: travis
+ provider: s3
+ bucket: travis-jgm-pandoc
+ region: us-west-1
+ edge: true
+ local_dir: macos-release-candidate
+ access_key_id:
+ secure: ohEst8EP8Z3r/bPMlYgPATo3B/ye48Z0aGp4W1pEhDZjqufLUVTFBIoicvPApCkTrbKMNTdG+KmasrO/leHpju0uFKYQHDtJmHZe3avIOIdbGnOqn97+mmLZBN5skiJWNtrxnN/TuAM+wlePz1dQpohPt6J3S70ct8DsOdZOaGI=
+ secret_access_key:
+ secure: qZ2RN4Bx4WRcVz9H8ae4S6a3AA85kcca0RdMimIREdGSx4ewMYa8lSdcKDvRbPwXRy8H3SeviqL2tTZw3+ej1jccAHowMj8Zvde5EJwX0+qO4Sr0zdWjnsvMeUmx9pO1oL3L/09KTWiMTT+d4XNpE8eqiY08qN8oMj0EPeR/AS4=