Skip to content

Commit 689abe5

Browse files
authored
Merge pull request #79 from haskell-servant/servant-0.14
Allow servant-0.14
2 parents 6105f1e + e76050e commit 689abe5

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.travis.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,18 @@ install:
6464
- BENCH=${BENCH---enable-benchmarks}
6565
- TEST=${TEST---enable-tests}
6666
- HADDOCK=${HADDOCK-true}
67-
- INSTALLED=${INSTALLED-true}
67+
- UNCONSTRAINED=${UNCONSTRAINED-true}
68+
- NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false}
6869
- GHCHEAD=${GHCHEAD-false}
6970
- travis_retry cabal update -v
7071
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
7172
- rm -fv cabal.project cabal.project.local
7273
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
7374
- "printf 'packages: \".\"\\n' > cabal.project"
74-
- cat cabal.project
75+
- touch cabal.project.local
76+
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
77+
- cat cabal.project || true
78+
- cat cabal.project.local || true
7579
- if [ -f "./configure.ac" ]; then
7680
(cd "." && autoreconf -i);
7781
fi
@@ -90,13 +94,13 @@ script:
9094
- cd ${DISTDIR} || false
9195
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
9296
- "printf 'packages: servant-swagger-*/*.cabal\\n' > cabal.project"
93-
- cat cabal.project
97+
- touch cabal.project.local
98+
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
99+
- cat cabal.project || true
100+
- cat cabal.project.local || true
94101
# this builds all libraries and executables (without tests/benchmarks)
95102
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
96103

97-
# Build with installed constraints for packages in global-db
98-
- if $INSTALLED; then echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks $(${HCPKG} list --global --simple-output --names-only | sed 's/\([a-zA-Z0-9-]\{1,\}\) */--constraint="\1 installed" /g') all | sh; else echo "Not building with installed constraints"; fi
99-
100104
# build & run tests, build benchmarks
101105
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
102106
- if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi
@@ -108,5 +112,8 @@ script:
108112
- rm -rf ./dist-newstyle
109113
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
110114

115+
# Build without installed constraints for packages in global-db
116+
- if $UNCONSTRAINED; then rm -f cabal.project.local; echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks all; else echo "Not building without installed constraints"; fi
117+
111118
# REGENDATA ["--branch","master","--output",".travis.yml","servant-swagger.cabal"]
112119
# EOF

servant-swagger.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ library
7878
, http-media >=0.6.3 && <0.8
7979
, insert-ordered-containers >=0.1.0.0 && <0.3
8080
, lens >=4.7.0.1 && <4.17
81-
, servant >=0.13 && <0.14
81+
, servant >=0.13 && <0.15
8282
, singleton-bool >=0.1.3 && <0.2
8383
, swagger2 >=2.1 && <2.3
8484
, text >=1.2.0.6 && <1.3

0 commit comments

Comments
 (0)