Skip to content

Commit 0d4a7d3

Browse files
committed
travis config fixup
1 parent 1b54abc commit 0d4a7d3

3 files changed

Lines changed: 25 additions & 15 deletions

File tree

.travis.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
11
language: c
22

3-
sudo: false
4-
5-
services:
6-
- postgresql
7-
addons:
8-
postgresql: "9.4"
3+
sudo: required
94

105
matrix:
116
include:
12-
- env: CABALVER=1.18 GHCVER=7.8.4
13-
addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}}
14-
- env: CABALVER=1.22 GHCVER=7.10.3
15-
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
167
- env: CABALVER=1.24 GHCVER=8.0.1
178
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}}
189
- env: CABALVER=head GHCVER=head
@@ -23,12 +14,26 @@ matrix:
2314

2415
before_install:
2516
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
17+
- sudo /etc/init.d/postgresql stop
18+
- sudo apt-get -y remove --purge postgresql-9.1
19+
- sudo apt-get -y remove --purge postgresql-9.2
20+
- sudo apt-get -y remove --purge postgresql-9.3
21+
- sudo apt-get -y remove --purge postgresql-9.4
22+
- sudo apt-get -y autoremove
23+
- sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 7FCC7D46ACCC4CF8
24+
- sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main 9.5" >> /etc/apt/sources.list.d/postgresql.list'
25+
- sudo apt-get update
26+
- sudo apt-get -y install postgresql-9.5
27+
- sudo sh -c 'echo "local all postgres trust" > /etc/postgresql/9.5/main/pg_hba.conf'
28+
- sudo sh -c 'echo -n "host all all 127.0.0.1/32 trust" >> /etc/postgresql/9.5/main/pg_hba.conf'
29+
- sudo /etc/init.d/postgresql restart
2630

2731
install:
32+
- psql --version
2833
- cabal --version
2934
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
3035
- travis_retry cabal update
31-
- cabal install --only-dependencies --enable-tests
36+
- cabal install -v --only-dependencies --enable-tests
3237

3338
before_script:
3439
- psql -U postgres -c 'create database test_db;'
@@ -44,7 +49,12 @@ script:
4449
- cabal sdist
4550
- cabal haddock | grep "100%" | wc -l | grep "5"
4651

52+
branches:
53+
only:
54+
- master
55+
4756
notifications:
4857
email:
4958
recipients:
5059
- zohl@fmap.me
60+

postgresql-simple-bind.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ source-repository head
2222
location: https://github.com/zohl/postgresql-simple-bind.git
2323

2424
library
25-
build-depends: base >= 4.8 && < 5.0
25+
build-depends: base >= 4.7 && < 5.0
2626
, attoparsec >= 0.13.0 && < 0.14
2727
, bytestring >= 0.10.8 && < 0.11
2828
, heredoc >= 0.2.0 && < 0.3
@@ -57,7 +57,7 @@ test-suite tests
5757

5858
ghc-options: -Wall
5959

60-
build-depends: base >= 4.8 && < 5.0
60+
build-depends: base >= 4.7 && < 5.0
6161
, bytestring >= 0.10.8 && < 0.11
6262
, HUnit
6363
, postgresql-simple >= 0.5.2 && < 0.6
@@ -80,7 +80,7 @@ test-suite examples
8080

8181
ghc-options: -Wall
8282

83-
build-depends: base >= 4.8 && < 5.0
83+
build-depends: base >= 4.7 && < 5.0
8484
, attoparsec >= 0.13.0 && < 0.14
8585
, bytestring >= 0.10.8 && < 0.11
8686
, case-conversion

src/Database/PostgreSQL/Simple/Bind/Implementation.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ instance ToField Argument where
6161

6262
formatArgument :: Argument -> String
6363
formatArgument (MandatoryArg _name _) = "?"
64-
formatArgument (OptionalArg name (Just _)) = name ++ " => ?"
64+
formatArgument (OptionalArg name (Just _)) = name ++ " := ?"
6565
formatArgument (OptionalArg _ Nothing) = error "TODO"
6666

6767

0 commit comments

Comments
 (0)