From e77c8be9f9a7e108613c43ec4a7200ca4ed42640 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 7 Dec 2016 20:15:08 -0500 Subject: [PATCH] Support for newest nightly (fixes #27) --- ChangeLog.md | 4 ++++ Stackage/Curator/UploadDocs.hs | 2 +- Stackage/Curator/UploadIndex.hs | 2 +- Stackage/Upload.hs | 3 +-- stack.yaml | 9 +++++---- stackage-curator.cabal | 17 ++++------------- 6 files changed, 16 insertions(+), 21 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index ef6a92f..214bf5e 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,7 @@ +## 0.14.4 + +* Support latest Stackage Nightly [#27](https://github.com/fpco/stackage-curator/issues/27) + ## 0.14.3 * Much improved logic for calculating if a package needs to be rebuilt diff --git a/Stackage/Curator/UploadDocs.hs b/Stackage/Curator/UploadDocs.hs index 08b5d17..d64fb75 100644 --- a/Stackage/Curator/UploadDocs.hs +++ b/Stackage/Curator/UploadDocs.hs @@ -82,7 +82,7 @@ uploadDocs :: FilePath -- ^ directory containing docs -> Text -- ^ bucket name -> IO () uploadDocs input' bundleFile name bucket = do - env <- newEnv NorthVirginia Discover + env <- newEnv Discover unlessM (Dir.doesDirectoryExist input') $ error $ "Could not find directory: " ++ show input' input <- fmap ( "") $ Dir.canonicalizePath input' diff --git a/Stackage/Curator/UploadIndex.hs b/Stackage/Curator/UploadIndex.hs index 188983a..4dff31e 100644 --- a/Stackage/Curator/UploadIndex.hs +++ b/Stackage/Curator/UploadIndex.hs @@ -27,7 +27,7 @@ uploadIndex -> Text -- ^ key prefix -> IO () uploadIndex bpFile target bucket prefix = do - env <- newEnv NorthVirginia Discover + env <- newEnv Discover bp <- decodeFileEither bpFile >>= either throwM return let toInclude = getToInclude bp runResourceT $ do diff --git a/Stackage/Upload.hs b/Stackage/Upload.hs index 993eb4f..fe6da4d 100644 --- a/Stackage/Upload.hs +++ b/Stackage/Upload.hs @@ -35,7 +35,7 @@ uploadHackageDistro -> Manager -> IO (Response LByteString) uploadHackageDistro name bp username password manager = do - req1 <- parseUrlThrow $ concat + req1 <- parseRequest $ concat [ "https://hackage.haskell.org/distro/" , unpack name , "/packages.csv" @@ -43,7 +43,6 @@ uploadHackageDistro name bp username password manager = do let req2 = req1 { requestHeaders = [("Content-Type", "text/csv")] , requestBody = RequestBodyLBS csv - , checkStatus = \_ _ _ -> Nothing , method = "PUT" } httpLbs (applyBasicAuth username password req2) manager diff --git a/stack.yaml b/stack.yaml index 3e43b04..4387c0b 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,5 @@ -resolver: lts-7.3 -flags: - stackage-curator: - monad_unlift_0_2: true +resolver: nightly-2016-12-07 +extra-deps: +- store-0.3 +- store-core-0.3 +- th-utilities-0.2.0.1 diff --git a/stackage-curator.cabal b/stackage-curator.cabal index f67e583..4cccbf1 100644 --- a/stackage-curator.cabal +++ b/stackage-curator.cabal @@ -1,5 +1,5 @@ name: stackage-curator -version: 0.14.3 +version: 0.14.4 synopsis: Tools for curating Stackage bundles description: Please see for a description and documentation. homepage: https://github.com/fpco/stackage-curator @@ -14,11 +14,6 @@ extra-source-files: README.md ChangeLog.md test/test-build-constraints.yaml -flag monad_unlift_0_2 - default: True - manual: False - description: Use monad-unlift 0.2 or newer - library default-language: Haskell2010 other-extensions: TemplateHaskell @@ -66,7 +61,7 @@ library , aeson , yaml , unix-compat - , http-client >= 0.4.30 + , http-client >= 0.5 , http-conduit , http-client-tls , temporary @@ -82,7 +77,7 @@ library , blaze-html , html-conduit , mime-types - , amazonka >= 1.1 + , amazonka >= 1.4.5 , amazonka-s3 , amazonka-core , xml-types @@ -99,12 +94,8 @@ library , exceptions , unordered-containers , hashable - - if flag(monad_unlift_0_2) - build-depends: monad-unlift >= 0.2 + , monad-unlift >= 0.2 , monad-unlift-ref >= 0.2 - else - build-depends: monad-unlift >= 0.1.1 && < 0.2 executable stackage-curator default-language: Haskell2010