Skip to content

Commit

Permalink
Merge branch 'master' into any-prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
lierdakil committed Jan 23, 2019
2 parents cd4299e + 740960b commit 84b8e1f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 22 deletions.
21 changes: 16 additions & 5 deletions .travis.yml
@@ -1,12 +1,17 @@
language: c
sudo: true

cache: false
cache:
directories:
- $HOME/.cabal/
- $HOME/.ghc/

addons:
apt:
homebrew:
packages:
- libgmp-dev
- ghc
- cabal-install
- upx

env:
- secure: "JlX01XMktACOHe7p+aQr60dwTVRu1GHzbx6dFAQpg+LtFq3GuSsJbpprRRjVaXHQzQh4TQLaNuktOuB9u042+SDZl52xwIpn8ViTiNnH1QMCMzzPMrOMhNkE+3Z4BIWWe4PBKdPHdBxwanhOMh1BIxWrq3wy//PEOG9qJqJgLWw="
Expand All @@ -20,9 +25,15 @@ os:

script:
- export -f travis_retry
- travis_wait 90 "${TRAVIS_OS_NAME}/build.sh"
# Output something every 9 minutes (540 seconds) or Travis kills the job
- while sleep 540; do echo "=====[ $SECONDS seconds still running ]====="; done &
- "${TRAVIS_OS_NAME}/build.sh"
# Kill the sleep loop
- kill %1
# Print built version string
- ./pandoc-crossref -v
- RELEASE_FN=( *-pandoc_*.tar.gz )
- travis_retry curl -T "$TRAVIS_BUILD_DIR/$RELEASE_FN" -ulierdakil:$BINTRAY_API_KEY "https://api.bintray.com/content/lierdakil/pandoc-crossref/pandoc-crossref/nightly/build-$(date -u +%FT%T)-$(git rev-parse HEAD)-$RELEASE_FN?publish=1"
- travis_retry curl -T "$TRAVIS_BUILD_DIR/$RELEASE_FN" -ulierdakil:$BINTRAY_API_KEY "https://api.bintray.com/content/lierdakil/pandoc-crossref/pandoc-crossref/nightly/build-$(date -u +%FT%T)-$(git symbolic-ref --short HEAD)-$(git rev-parse --short HEAD)-$RELEASE_FN?publish=1"
deploy:
provider: releases
api_key:
Expand Down
2 changes: 2 additions & 0 deletions appveyor.yml
Expand Up @@ -59,6 +59,8 @@ test_script:
- forfiles /P .\dist-newstyle /M pandoc*.exe /S /C "cmd /C copy @path C:\pandoc-crossref"

after_test:
# print built version string
- .\pandoc-crossref.exe -v
# create zip artifacts
- 7z a "%OSARCH%-pandoc_%PANDOC_VERSION%.zip" pandoc-crossref.exe

Expand Down
3 changes: 2 additions & 1 deletion linux/build.sh
Expand Up @@ -5,11 +5,12 @@ git config --unset core.bare
git reset --hard HEAD
cabal new-build --jobs exe:pandoc-crossref $CABAL_OPTS
find dist-newstyle -type f -perm +100 -name pandoc-crossref -exec cp {} ./ \;
#upx --ultra-brute --best pandoc-crossref
upx --ultra-brute --best pandoc-crossref
export PANDOC=\"\$(find /root/.cabal -type f -perm +100 -name pandoc -print)\"
\$PANDOC -s -t man docs/index.md -o pandoc-crossref.1
PANDOCVER=\$(\$PANDOC --version | head -n1 | cut -f2 -d' ' | tr '.' '_')
tar czf \"/mnt/linux-pandoc_\$PANDOCVER.tar.gz\" ./pandoc-crossref ./pandoc-crossref.1
cp ./pandoc-crossref /mnt/
"

docker pull lierdakil/pandoc-crossref-build:latest
Expand Down
24 changes: 8 additions & 16 deletions osx/build.sh
@@ -1,18 +1,10 @@
#!/bin/bash

export STACK_YAML=stack-release.yaml

unset CC
export PATH=/opt/ghc/$GHCVER/bin:$PATH
mkdir -p ~/.local/bin
export PATH=$HOME/.local/bin:$PATH
travis_retry curl -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 -C ~/.local/bin
stack --no-terminal setup
stack --no-terminal build

# deployment
stack --no-terminal install
stack --no-terminal exec -- pandoc -s -t man docs/index.md -o $HOME/.local/bin/pandoc-crossref.1
PANDOCVER=$(stack --no-terminal exec -- --version | head -n1 | cut -f2 -d' ' | tr '.' '_')
RELEASE_FN="macos-pandoc_$PANDOCVER.tar.gz"
tar czf "$TRAVIS_BUILD_DIR/$RELEASE_FN" -C "$HOME/.local/bin/" "./pandoc-crossref" "./pandoc-crossref.1"
cabal new-update
cabal new-build exe:pandoc-crossref $CABAL_OPTS
find dist-newstyle -type f -perm +100 -name pandoc-crossref -exec cp {} ./ \;
upx --ultra-brute --best pandoc-crossref
PANDOC="$(find "$HOME/.cabal" -type f -perm +100 -name pandoc -print)"
$PANDOC -s -t man docs/index.md -o pandoc-crossref.1
PANDOCVER=$($PANDOC --version | head -n1 | cut -f2 -d' ' | tr '.' '_')
tar czf "macos-pandoc_$PANDOCVER.tar.gz" ./pandoc-crossref ./pandoc-crossref.1

0 comments on commit 84b8e1f

Please sign in to comment.