Skip to content

Commit

Permalink
Merge branch 'hotfix/v0.7.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
maoe committed Jan 7, 2020
2 parents 85fa214 + e8e9965 commit 56e2696
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 82 deletions.
137 changes: 70 additions & 67 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# This Travis job script has been generated by a script via
#
# haskell-ci 'sensu-run.cabal' '--ghc-head' '--osx=8.6.5' '--apt=jq' '--travis-patches=.travis/deploy.patch' '--travis-patches=.travis/osx.patch' '--travis-patches=.travis/releases.patch'
# haskell-ci 'sensu-run.cabal' '--ghc-head' '--osx=8.8.1' '--apt=jq' '--travis-patches=.travis/deploy.patch' '--travis-patches=.travis/osx.patch' '--travis-patches=.travis/releases.patch'
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.3.20190624
# version: 0.9.20191213
#
version: ~> 1.0
language: c
os: linux
dist: xenial
git:
# whether to recursively clone submodules
Expand All @@ -15,6 +17,7 @@ cache:
directories:
- $HOME/.cabal/packages
- $HOME/.cabal/store
- $HOME/.hlint
- $HOME/.ghc-install
before_cache:
- rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
Expand All @@ -25,140 +28,140 @@ before_cache:
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
- rm -rfv $CABALHOME/packages/head.hackage
matrix:
jobs:
include:
- compiler: ghc-8.8.1
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0","jq"]}}
env: GHCHEAD=true
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.1","cabal-install-3.0","jq"]}}
os: linux
- compiler: ghc-8.6.5
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4","jq"]}}
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.0","jq"]}}
os: linux
env: GITHUB_RELEASE=true HACKAGE_RELEASE=true
- compiler: ghc-8.4.4
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-2.4","jq"]}}
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.0","jq"]}}
os: linux
- compiler: ghc-head
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-head","cabal-install-head","jq"]}}
env: GHCHEAD=true
- compiler: ghc-8.6.5
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-head","cabal-install-head","jq"]}}
os: linux
- compiler: ghc-8.8.1
addons: {"homebrew":{"packages":["jq"]}}
os: osx
env: GITHUB_RELEASE=true
allow_failures:
- compiler: ghc-head
- compiler: ghc-8.8.1
before_install:
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
- WITHCOMPILER="-w $HC"
- HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//')
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then HADDOCK=$(echo $HADDOCK | sed "s:^/opt:$HOME/.ghc-install:"); fi
- HCPKG="$HC-pkg"
- unset CC
- CABAL=/opt/ghc/bin/cabal
- CABALHOME=$HOME/.cabal
- export PATH="$CABALHOME/bin:$PATH"
- TOP=$(pwd)
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; brew upgrade python@3; curl https://haskell.futurice.com/haskell-on-macos.py | python3 - --make-dirs --install-dir=$HOME/.ghc-install --cabal-alias=head install cabal-install-head ${TRAVIS_COMPILER}; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then HC=$HOME/.ghc-install/ghc/bin/$TRAVIS_COMPILER; HCPKG=${HC/ghc/ghc-pkg}; CABAL=$HOME/.ghc-install/ghc/bin/cabal; fi
- HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then curl https://haskell.futurice.com/haskell-on-macos.py | python3 - --make-dirs --install-dir=$HOME/.ghc-install --cabal-alias=3.0.0.0 install cabal-install-3.0.0.0 ${TRAVIS_COMPILER}; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then HC=$HOME/.ghc-install/ghc/bin/$TRAVIS_COMPILER; WITHCOMPILER="-w $HC"; HCPKG=${HC/ghc/ghc-pkg}; CABAL=$HOME/.ghc-install/ghc/bin/cabal; fi
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
- echo $HCNUMVER
- CABAL="$CABAL -vnormal+nowrap+markoutput"
- CABAL="$CABAL -vnormal+nowrap"
- set -o pipefail
- |
echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
echo 'BEGIN { state = "output"; }' >> .colorful.awk
echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
echo ' if (state == "cabal") {' >> .colorful.awk
echo ' print blue($0)' >> .colorful.awk
echo ' } else {' >> .colorful.awk
echo ' print $0' >> .colorful.awk
echo ' }' >> .colorful.awk
echo '}' >> .colorful.awk
- cat .colorful.awk
- |
color_cabal_output () {
awk -f $TOP/.colorful.awk
}
- echo text | color_cabal_output
install:
- ${CABAL} --version
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
- TEST=--enable-tests
- BENCH=--enable-benchmarks
- GHCHEAD=${GHCHEAD-false}
- HEADHACKAGE=false
- if [ $HCNUMVER -gt 80801 ] ; then HEADHACKAGE=true ; fi
- rm -f $CABALHOME/config
- |
echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
echo "remote-build-reporting: anonymous" >> $CABALHOME/config
echo "write-ghc-environment-files: always" >> $CABALHOME/config
echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
echo "world-file: $CABALHOME/world" >> $CABALHOME/config
echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
echo "install-dirs user" >> $CABALHOME/config
echo " prefix: $CABALHOME" >> $CABALHOME/config
echo "repository hackage.haskell.org" >> $CABALHOME/config
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
echo "remote-build-reporting: anonymous" >> $CABALHOME/config
echo "write-ghc-environment-files: always" >> $CABALHOME/config
echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
echo "world-file: $CABALHOME/world" >> $CABALHOME/config
echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
echo "install-dirs user" >> $CABALHOME/config
echo " prefix: $CABALHOME" >> $CABALHOME/config
echo "repository hackage.haskell.org" >> $CABALHOME/config
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
echo " secure: True" >> $CABALHOME/config
echo " key-threshold: 3" >> $CABALHOME/config
echo " root-keys:" >> $CABALHOME/config
echo " fe331502606802feac15e514d9b9ea83fee8b6ffef71335479a2e68d84adc6b0" >> $CABALHOME/config
echo " 1ea9ba32c526d1cc91ab5e5bd364ec5e9e8cb67179a471872f6e26f0ae773d42" >> $CABALHOME/config
echo " 2c6c3627bd6c982990239487f1abd02e08a02e6cf16edb105a8012d444d870c3" >> $CABALHOME/config
echo " 0a5c7ea47cd1b15f01f5f51a33adda7e655bc0f0b0615baa8e271f4c3351e21d" >> $CABALHOME/config
echo " 51f0161b906011b52c6613376b1ae937670da69322113a246a09f807c62f6921" >> $CABALHOME/config
- |
if $GHCHEAD; then
if $HEADHACKAGE; then
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1/g')" >> $CABALHOME/config
echo "repository head.hackage" >> $CABALHOME/config
echo " url: http://head.hackage.haskell.org/" >> $CABALHOME/config
echo "repository head.hackage.ghc.haskell.org" >> $CABALHOME/config
echo " url: https://ghc.gitlab.haskell.org/head.hackage/" >> $CABALHOME/config
echo " secure: True" >> $CABALHOME/config
echo " root-keys: 07c59cb65787dedfaef5bd5f987ceb5f7e5ebf88b904bbd4c5cbdeb2ff71b740" >> $CABALHOME/config
echo " 2e8555dde16ebd8df076f1a8ef13b8f14c66bad8eafefd7d9e37d0ed711821fb" >> $CABALHOME/config
echo " 8f79fd2389ab2967354407ec852cbe73f2e8635793ac446d09461ffb99527f6e" >> $CABALHOME/config
echo " root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d" >> $CABALHOME/config
echo " 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329" >> $CABALHOME/config
echo " f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89" >> $CABALHOME/config
echo " key-threshold: 3" >> $CABALHOME/config
fi
- |
echo "program-default-options" >> $CABALHOME/config
echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
- cat $CABALHOME/config
- rm -fv cabal.project cabal.project.local cabal.project.freeze
- travis_retry ${CABAL} v2-update -v
# Generate cabal.project
- rm -rf cabal.project cabal.project.local cabal.project.freeze
- touch cabal.project
- |
echo 'packages: "."' >> cabal.project
echo "packages: ." >> cabal.project
- |
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(sensu-run)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
- cat cabal.project || true
- cat cabal.project.local || true
- if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
- ${CABAL} v2-freeze -w ${HC} ${TEST} ${BENCH} | color_cabal_output
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH}
- "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
- rm cabal.project.freeze
- ${CABAL} v2-build -w ${HC} ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
- ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all
script:
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
# Packaging...
- ${CABAL} v2-sdist all | color_cabal_output
- ${CABAL} v2-sdist all
# Unpacking...
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
- cd ${DISTDIR} || false
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;
- PKGDIR_sensu_run="$(find . -maxdepth 1 -type d -regex '.*/sensu-run-[0-9.]*')"
# Generate cabal.project
- rm -rf cabal.project cabal.project.local cabal.project.freeze
- touch cabal.project
- |
echo 'packages: "sensu-run-*/*.cabal"' >> cabal.project
echo "packages: ${PKGDIR_sensu_run}" >> cabal.project
- |
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(sensu-run)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
- cat cabal.project || true
- cat cabal.project.local || true
# Building...
# this builds all libraries and executables (without tests/benchmarks)
- ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks all | color_cabal_output
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
# Building with tests and benchmarks...
# build & run tests, build benchmarks
- ${CABAL} v2-build -w ${HC} ${TEST} ${BENCH} all | color_cabal_output
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all
# cabal check...
- (cd sensu-run-* && ${CABAL} -vnormal check)
- (cd ${PKGDIR_sensu_run} && ${CABAL} -vnormal check)
# Building without installed constraints for packages in global-db...
- rm -f cabal.project.local
- ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks all | color_cabal_output
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all

# REGENDATA ["sensu-run.cabal","--ghc-head","--osx=8.6.5","--apt=jq","--travis-patches=.travis/deploy.patch","--travis-patches=.travis/osx.patch","--travis-patches=.travis/releases.patch"]
# REGENDATA ("0.9.20191213",["sensu-run.cabal","--ghc-head","--osx=8.8.1","--apt=jq","--travis-patches=.travis/deploy.patch","--travis-patches=.travis/osx.patch","--travis-patches=.travis/releases.patch"])
# EOF

before_deploy:
Expand Down
2 changes: 1 addition & 1 deletion .travis/deploy.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ index 16af3a5..ab4b9a1 100644
+++ b/.travis.yml
@@ -164,3 +164,26 @@ script:

# REGENDATA ["travis","sensu-run.cabal","--ghc-head","--osx","8.6.5","--apt","jq"]
# REGENDATA ["travis","sensu-run.cabal","--ghc-head","--osx","8.8.1","--apt","jq"]
# EOF
+
+before_deploy:
Expand Down
13 changes: 11 additions & 2 deletions .travis/osx.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@ index 1ed9f1c..aac32ca 100644
@@ -42,7 +42,7 @@ matrix:
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-head","cabal-install-head","jq"]}}
env: GHCHEAD=true
- compiler: ghc-8.6.5
- addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4","jq"]}}
- compiler: ghc-8.8.1
- addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.1","cabal-install-3.0","jq"]}}
+ addons: {"homebrew":{"packages":["jq"]}}
os: osx
allow_failures:
- compiler: ghc-head
@@ -60,7 +60,7 @@ before_install:
- CABALHOME=$HOME/.cabal
- export PATH="$CABALHOME/bin:$PATH"
- TOP=$(pwd)
- - if [ "$TRAVIS_OS_NAME" = "osx" ]; then curl https://haskell.futurice.com/haskell-on-macos.py | python3 - --make-dirs --install-dir=$HOME/.ghc-install --cabal-alias=head install cabal-install-head ${TRAVIS_COMPILER}; fi
+ - if [ "$TRAVIS_OS_NAME" = "osx" ]; then curl https://haskell.futurice.com/haskell-on-macos.py | python3 - --make-dirs --install-dir=$HOME/.ghc-install --cabal-alias=3.0.0.0 install cabal-install-3.0.0.0 ${TRAVIS_COMPILER}; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then HC=$HOME/.ghc-install/ghc/bin/$TRAVIS_COMPILER; WITHCOMPILER="-w $HC"; HCPKG=${HC/ghc/ghc-pkg}; CABAL=$HOME/.ghc-install/ghc/bin/cabal; fi
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
- echo $HCNUMVER
16 changes: 8 additions & 8 deletions .travis/releases.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ diff --git a/.travis.yml b/.travis.yml
index 0001076..5ca88c0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,6 +32,7 @@ matrix:
env: GHCHEAD=true
@@ -36,6 +36,7 @@ matrix:
- compiler: ghc-8.6.5
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4","jq"]}}
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.0","jq"]}}
os: linux
+ env: GITHUB_RELEASE=true HACKAGE_RELEASE=true
- compiler: ghc-8.4.4
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-2.4","jq"]}}
- compiler: ghc-head
@@ -40,6 +41,7 @@ matrix:
- compiler: ghc-8.6.5
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.0","jq"]}}
os: linux
@@ -45,6 +45,7 @@ matrix:
- compiler: ghc-8.8.1
addons: {"homebrew":{"packages":["jq"]}}
os: osx
+ env: GITHUB_RELEASE=true
allow_failures:
- compiler: ghc-head
- compiler: ghc-8.8.1
before_install:
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for sensu-run

## 0.7.0.4 -- 2019-01-07

* Relax upper version bounds for base and lens

## 0.7.0.3 -- 2019-08-20

* Relax upper version bound for optparse-applicative
Expand Down
6 changes: 3 additions & 3 deletions sensu-run.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.2
name: sensu-run
version: 0.7.0.3
version: 0.7.0.4
synopsis: A tool to send command execution results to Sensu
description:
@sensu-run@ is a command line tool to send command execution results to Sensu
Expand All @@ -27,15 +27,15 @@ executable sensu-run
build-depends:
, aeson >= 0.11 && < 1.5
, async < 2.3
, base >= 4.11 && < 4.13
, base >= 4.11 && < 4.14
, bytestring >= 0.10 && < 0.11
, directory < 1.4
, filelock < 0.2
, filepath >= 1.4.1 && < 1.5
, http-client >= 0.5.6 && < 0.7
, http-client-tls < 0.4
, http-types >= 0.9.1 && < 0.13
, lens >= 4.15 && < 4.18
, lens >= 4.15 && < 4.19
, network >= 2.2.3 && < 3.2
, optparse-applicative >= 0.12 && < 0.16
, process >= 1.6.3.0 && < 1.7
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-13.25
resolver: lts-14.20
packages:
- '.'
extra-deps: []
Expand Down

0 comments on commit 56e2696

Please sign in to comment.