packages feed

stackage-curator 0.13.2 → 0.13.3

raw patch · 5 files changed

+32/−9 lines, 5 filesdep −stackage-metadatadep ~basenew-component:exe:upload-index

Dependencies removed: stackage-metadata

Dependency ranges changed: base

Files

ChangeLog.md view
@@ -1,3 +1,11 @@+## 0.13.3++Move away from outdated stackage-metadata++We already have local package index functionality, which uses the+correct index. See:+https://groups.google.com/d/msg/stackage/bf1xewtp9oo/MUB2K20OJQAJ+ ## 0.13.2  * --no-rebuild-cabal
Stackage/Curator/UploadIndex.hs view
@@ -12,8 +12,7 @@ import Stackage.BuildConstraints import Stackage.BuildPlan import Stackage.Prelude-import Stackage.Install (defaultIndexLocation)-import Stackage.PackageIndex.Conduit+import Stackage.PackageIndex import qualified Codec.Archive.Tar as Tar import Data.Conduit.Lazy (lazyConsume) import Codec.Compression.GZip (compress)@@ -33,9 +32,9 @@     let toInclude = getToInclude bp     runResourceT $ do         entries <- lazyConsume-            $  sourceAllCabalFiles defaultIndexLocation+            $  sourcePackageIndex             $= filterC toInclude-            $= mapC cfeEntry+            $= mapC ucfEntry         let lbs = compress $ Tar.write entries             key = concat                 [ prefix@@ -44,11 +43,11 @@                 ]         sourceLazy lbs $$ upload False env bucket key -getToInclude :: BuildPlan -> CabalFileEntry -> Bool+getToInclude :: BuildPlan -> UnparsedCabalFile -> Bool getToInclude bp =     go   where-    go cfe = lookup (cfeName cfe) packages == Just (cfeVersion cfe)+    go cfe = lookup (ucfName cfe) packages == Just (ucfVersion cfe)      packages = siCorePackages (bpSystemInfo bp) ++                (ppVersion <$> bpPackages bp)
Stackage/PackageIndex.hs view
@@ -62,6 +62,7 @@     , ucfVersion :: Version     , ucfPath    :: FilePath     , ucfContent :: LByteString+    , ucfEntry   :: Tar.Entry     }  data SimplifiedComponentInfo = SimplifiedComponentInfo@@ -161,7 +162,7 @@          => FilePath -- ^ ~/.stackage/curator          -> UnparsedCabalFile          -> m SimplifiedPackageDescription-ucfParse root (UnparsedCabalFile name version fp lbs) = liftIO $ do+ucfParse root (UnparsedCabalFile name version fp lbs _entry) = liftIO $ do     eres <- tryIO $ Bin.taggedDecodeFileOrFail cache     case eres of         Right (Right x) -> return x@@ -219,6 +220,7 @@                 , ucfVersion = version                 , ucfPath = Tar.entryPath e                 , ucfContent = lbs+                , ucfEntry = e                 }         | otherwise = return () 
+ app/upload-index.hs view
@@ -0,0 +1,8 @@+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+import Stackage.Curator.UploadIndex+import Stackage.Prelude++main :: IO ()+main = do+    uploadIndex "lts-5.10.yaml" (TargetLts 5 10) "bucket" "prefix"
stackage-curator.cabal view
@@ -1,5 +1,5 @@ name:                stackage-curator-version:             0.13.2+version:             0.13.3 synopsis:            Tools for curating Stackage bundles description:         Please see <http://www.stackage.org/package/stackage-curator> for a description and documentation. homepage:            https://github.com/fpco/stackage@@ -86,12 +86,18 @@                      , cryptohash                      , cryptohash-conduit                      , resourcet-                     , stackage-metadata >= 0.3                      , stackage-install >= 0.1.1                      , lucid                      , binary                      , binary-tagged                      , syb++executable upload-index+  default-language:    Haskell2010+  hs-source-dirs:      app+  main-is:             upload-index.hs+  build-depends:       base+                     , stackage-curator  executable stackage-curator   default-language:    Haskell2010