language: haskell

before_install:
  - cabal install gtk2hs-buildtools hlint
  - travis/cabal-apt-install $mode
  - npm install jshint

install:
  # Treat warnings as errors
  - "sed -Ei 's/ghc-options: +/\0-Werror /' tianbar.cabal"
  - cabal configure $mode -fWerror

script:
  - hlint src
  - jshint --show-non-errors scripts
  - cabal build
  # TODO: tests

env:
  matrix:
    - mode="--enable-tests" script="cabal test --show-details=always"
  global:
    secure: La3uBTMLW+gWTzRKsVmh+xN7PSVsGNHaqUIIXbEvv2gcdH5drCtsFS56VZ/bXR3IOpDhFX6+M6qXkMYlWcsCswvaecmjNwqOq8lc5WYjLdkinRugwgEVv5+tsS3Ybgnz+A6hvJIkNnkwHa8kSVA2ppOA6ZDteZguvDk73XGQPs0=

after_success:
  - git checkout -- tianbar.cabal
  - rm dist/tianbar*.tar.gz
  - cabal sdist
  - if [ $TRAVIS_PULL_REQUEST == 'false' -a $TRAVIS_BRANCH == 'release' ]; then cabal upload dist/tianbar*.tar.gz --username=AlexeyKotlyarov --password=$PASSWORD; fi

language: haskell

before_install:
  - cabal install gtk2hs-buildtools hlint
  - travis/cabal-apt-install $mode
  - npm install jshint

install:
  # Treat warnings as errors
  - "sed -Ei 's/ghc-options: +/\0-Werror /' tianbar.cabal"
  - cabal configure $mode -fWerror

script:
  - hlint src
  - jshint --show-non-errors scripts
  - cabal build
  - cabal test
  - cabal sdist
  - cabal install dist/tianbar*.tar.gz

env:
  matrix:
    - mode="--enable-tests" script="cabal test --show-details=always"
  global:
    secure: La3uBTMLW+gWTzRKsVmh+xN7PSVsGNHaqUIIXbEvv2gcdH5drCtsFS56VZ/bXR3IOpDhFX6+M6qXkMYlWcsCswvaecmjNwqOq8lc5WYjLdkinRugwgEVv5+tsS3Ybgnz+A6hvJIkNnkwHa8kSVA2ppOA6ZDteZguvDk73XGQPs0=

after_success:
  - git checkout -- tianbar.cabal
  - rm dist/tianbar*.tar.gz
  - cabal sdist
  - if [ $TRAVIS_PULL_REQUEST == 'false' -a $TRAVIS_BRANCH == 'release' ]; then cabal upload dist/tianbar*.tar.gz --username=AlexeyKotlyarov --password=$PASSWORD; fi

Test that the package installs
Test that the package installs
