blob: 6855ddd754cecbe1cd2b1cb63500cf3670ba9376 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
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
stack build pandoc
for f in $(find .stack-work/install -name 'pandoc' -perm +001 -type f); do cp $f ${DEST}/bin/; done
strip ${DEST}/bin/pandoc
cp man/pandoc.1 ${DEST}/share/man/man1/pandoc.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:
all_branches: true
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=
|