Support servant-0.14

Move to haskell-servant organisation
This commit is contained in:
Oleg Grenrus 2018-06-12 22:09:23 +03:00
parent 4071f86ad5
commit 71ee4b64c3
9 changed files with 68 additions and 40 deletions

View File

@ -64,14 +64,18 @@ install:
- BENCH=${BENCH---enable-benchmarks}
- TEST=${TEST---enable-tests}
- HADDOCK=${HADDOCK-true}
- INSTALLED=${INSTALLED-true}
- UNCONSTRAINED=${UNCONSTRAINED-true}
- NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false}
- GHCHEAD=${GHCHEAD-false}
- travis_retry cabal update -v
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
- rm -fv cabal.project cabal.project.local
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
- "printf 'packages: \"servant-swagger-ui\" \"servant-swagger-ui-core\" \"servant-swagger-ui-example\" \"servant-swagger-ui-jensoleg\" \"servant-swagger-ui-redoc\"\\n' > cabal.project"
- cat cabal.project
- touch cabal.project.local
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
- cat cabal.project || true
- cat cabal.project.local || true
- if [ -f "servant-swagger-ui/configure.ac" ]; then
(cd "servant-swagger-ui" && autoreconf -i);
fi
@ -106,13 +110,13 @@ script:
- cd ${DISTDIR} || false
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
- "printf 'packages: servant-swagger-ui-*/*.cabal servant-swagger-ui-core-*/*.cabal servant-swagger-ui-example-*/*.cabal servant-swagger-ui-jensoleg-*/*.cabal servant-swagger-ui-redoc-*/*.cabal\\n' > cabal.project"
- cat cabal.project
- touch cabal.project.local
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
- cat cabal.project || true
- cat cabal.project.local || true
# this builds all libraries and executables (without tests/benchmarks)
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
# Build with installed constraints for packages in global-db
- 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
# build & run tests, build benchmarks
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
@ -127,6 +131,12 @@ script:
- rm -rf ./dist-newstyle
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
# Build without installed constraints for packages in global-db
- 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
# Constraint sets
- rm -rf cabal.project.local
# Constraint set servant-0.7
- if [ $HCNUMVER -ge 70800 ] && [ $HCNUMVER -lt 80000 ]; then cabal new-build -w ${HC} --disable-tests --disable-benchmarks --constraint='servant ==0.7.*' all; else echo skipping...; fi
@ -148,5 +158,9 @@ script:
# Constraint set servant-0.13
- if [ $HCNUMVER -ge 70800 ] && [ $HCNUMVER -lt 80600 ]; then cabal new-build -w ${HC} --disable-tests --disable-benchmarks --constraint='servant ==0.13.*' all; else echo skipping...; fi
# Constraint set servant-0.14
- if [ $HCNUMVER -ge 70800 ] && [ $HCNUMVER -lt 80600 ]; then cabal new-build -w ${HC} --disable-tests --disable-benchmarks --constraint='servant ==0.14.*' all; else echo skipping...; fi
# REGENDATA ["--branch","master","--output",".travis.yml","--config","cabal.project"]
# EOF

View File

@ -25,3 +25,7 @@ constraint-set servant-0.12
constraint-set servant-0.13
ghc: >= 7.8 && <8.6
constraints: servant ==0.13.*
constraint-set servant-0.14
ghc: >= 7.8 && <8.6
constraints: servant ==0.14.*

View File

@ -0,0 +1,3 @@
# 0.3.1
- Support `servant-0.14`

View File

@ -1,7 +1,6 @@
cabal-version: 1.12
name: servant-swagger-ui-core
version: 0.3
x-revision: 1
version: 0.3.1
synopsis: Servant swagger ui core components
category: Web, Servant, Swagger
@ -11,18 +10,20 @@ description:
See servant-swagger-ui, servant-swagger-ui-jensoleg or
servant-swagger-ui-redoc for "concrete" implementations.
homepage: https://github.com/phadej/servant-swagger-ui
bug-reports: https://github.com/phadej/servant-swagger-ui/issues
homepage: https://github.com/haskell-servant/servant-swagger-ui
bug-reports: https://github.com/haskell-servant/servant-swagger-ui/issues
author: Oleg Grenrus <oleg.grenrus@iki.fi>
maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
maintainer: haskell-servant-maintainers@googlegroups.com
license: BSD3
license-file: LICENSE
build-type: Simple
tested-with: GHC ==7.8.4 || ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.3
extra-source-files:
Changelog.md
source-repository head
type: git
location: https://github.com/phadej/servant-swagger-ui
location: https://github.com/haskell-servant/servant-swagger-ui
flag servant-0-5
description: Whether use servant >= 0.5
@ -39,9 +40,9 @@ library
, blaze-markup >=0.7.0.2 && <0.9
, bytestring >=0.10.4.0 && <0.11
, http-media >=0.6.2 && <0.8
, servant >=0.4.4.5 && <0.14
, servant >=0.4.4.5 && <0.15
, servant-blaze >=0.4.4.5 && <0.9
, servant-server >=0.4.4.5 && <0.14
, servant-server >=0.4.4.5 && <0.15
, swagger2 >=2.0.1 && <2.3
, text >=1.2.0.6 && <1.3
, wai-app-static >=3.0.1.1 && <3.2

View File

@ -100,15 +100,18 @@ type SwaggerSchemaUI' (dir :: Symbol) (api :: *) =
-- to find schema file automatically.
data SwaggerUiHtml (dir :: Symbol) (api :: *) = SwaggerUiHtml T.Text
#if MIN_VERSION_servant(0,10,0)
#define LINK Link
#if MIN_VERSION_servant(0,14,0)
#define LINK Link ~ MkLink api Link
#define LINKPATH uriPath . linkURI
#elif MIN_VERSION_servant(0,10,0)
#define LINK Link ~ MkLink api
#define LINKPATH uriPath . linkURI
#else
#define LINK URI
#define LINK URI ~ MkLink api
#define LINKPATH uriPath
#endif
instance (KnownSymbol dir, HasLink api, LINK ~ MkLink api, IsElem api api)
instance (KnownSymbol dir, HasLink api, LINK, IsElem api api)
=> ToMarkup (SwaggerUiHtml dir api)
where
toMarkup (SwaggerUiHtml template) = preEscapedToMarkup

View File

@ -7,10 +7,10 @@ category: Web, Servant, Swagger
description:
A kind of test-suite of servant-swagger-ui
homepage: https://github.com/phadej/servant-swagger-ui
bug-reports: https://github.com/phadej/servant-swagger-ui/issues
homepage: https://github.com/haskell-servant/servant-swagger-ui
bug-reports: https://github.com/haskell-servant/servant-swagger-ui/issues
author: Oleg Grenrus <oleg.grenrus@iki.fi>
maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
maintainer: haskell-servant-maintainers@googlegroups.com
license: BSD3
license-file: LICENSE
build-type: Simple
@ -18,7 +18,7 @@ tested-with: GHC ==7.8.4 || ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.3
source-repository head
type: git
location: https://github.com/phadej/servant-swagger-ui
location: https://github.com/haskell-servant/servant-swagger-ui
executable servant-swagger-ui-example
main-is: Main.hs

View File

@ -1,6 +1,7 @@
cabal-version: 1.12
name: servant-swagger-ui-jensoleg
version: 0.3
x-revision: 1
synopsis: Servant swagger ui: Jens-Ole Graulund theme
category: Web, Servant, Swagger
@ -9,10 +10,10 @@ description:
.
Jsn-Ole Graulund theme https://github.com/jensoleg/swagger-org
homepage: https://github.com/phadej/servant-swagger-ui
bug-reports: https://github.com/phadej/servant-swagger-ui/issues
homepage: https://github.com/haskell-servant/servant-swagger-ui
bug-reports: https://github.com/haskell-servant/servant-swagger-ui/issues
author: Oleg Grenrus <oleg.grenrus@iki.fi>
maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
maintainer: haskell-servant-maintainers@googlegroups.com
license: BSD3
license-file: LICENSE
build-type: Simple
@ -71,7 +72,7 @@ extra-source-files:
source-repository head
type: git
location: https://github.com/phadej/servant-swagger-ui
location: https://github.com/haskell-servant/servant-swagger-ui
library
hs-source-dirs:
@ -85,8 +86,8 @@ library
base >=4.7 && <4.12
, bytestring >=0.10.4.0 && <0.11
, file-embed-lzma >=0 && <0.1
, servant >=0.4.4.5 && <0.14
, servant-server >=0.4.4.5 && <0.14
, servant >=0.4.4.5 && <0.15
, servant-server >=0.4.4.5 && <0.15
, swagger2 >=2.0.1 && <2.3
, text >=1.2.0.6 && <1.3
exposed-modules:

View File

@ -1,6 +1,7 @@
cabal-version: 1.12
name: servant-swagger-ui-redoc
version: 0.3.0.1.21.2
x-revision: 1
synopsis: Servant swagger ui: ReDoc theme
category: Web, Servant, Swagger
@ -9,10 +10,10 @@ description:
.
ReDoc theme: https://github.com/Rebilly/ReDoc
homepage: https://github.com/phadej/servant-swagger-ui
bug-reports: https://github.com/phadej/servant-swagger-ui/issues
homepage: https://github.com/haskell-servant/servant-swagger-ui
bug-reports: https://github.com/haskell-servant/servant-swagger-ui/issues
author: Oleg Grenrus <oleg.grenrus@iki.fi>
maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
maintainer: haskell-servant-maintainers@googlegroups.com
license: BSD3
license-file: LICENSE
build-type: Simple
@ -24,7 +25,7 @@ extra-source-files:
source-repository head
type: git
location: https://github.com/phadej/servant-swagger-ui
location: https://github.com/haskell-servant/servant-swagger-ui
library
hs-source-dirs:
@ -38,8 +39,8 @@ library
base >=4.7 && <4.12
, bytestring >=0.10.4.0 && <0.11
, file-embed-lzma >=0 && <0.1
, servant >=0.4.4.5 && <0.14
, servant-server >=0.4.4.5 && <0.14
, servant >=0.4.4.5 && <0.15
, servant-server >=0.4.4.5 && <0.15
, swagger2 >=2.0.1 && <2.3
, text >=1.2.0.6 && <1.3
exposed-modules:

View File

@ -1,15 +1,16 @@
cabal-version: 1.12
name: servant-swagger-ui
version: 0.3.0.3.13.2
x-revision: 1
synopsis: Servant swagger ui
category: Web, Servant, Swagger
description: Provide embedded swagger UI for servant and swagger (i.e. servant-swagger)
homepage: https://github.com/phadej/servant-swagger-ui
bug-reports: https://github.com/phadej/servant-swagger-ui/issues
homepage: https://github.com/haskell-servant/servant-swagger-ui
bug-reports: https://github.com/haskell-servant/servant-swagger-ui/issues
author: Oleg Grenrus <oleg.grenrus@iki.fi>
maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
maintainer: haskell-servant-maintainers@googlegroups.com
license: BSD3
license-file: LICENSE
build-type: Simple
@ -28,7 +29,7 @@ extra-source-files:
source-repository head
type: git
location: https://github.com/phadej/servant-swagger-ui
location: https://github.com/haskell-servant/servant-swagger-ui
library
hs-source-dirs:
@ -42,8 +43,8 @@ library
base >=4.7 && <4.12
, bytestring >=0.10.4.0 && <0.11
, file-embed-lzma >=0 && <0.1
, servant >=0.4.4.5 && <0.14
, servant-server >=0.4.4.5 && <0.14
, servant >=0.4.4.5 && <0.15
, servant-server >=0.4.4.5 && <0.15
, swagger2 >=2.0.1 && <2.3
, text >=1.2.0.6 && <1.3
exposed-modules: