stackage 0.5.1 → 0.5.2
raw patch · 5 files changed
+33/−12 lines, 5 files
Files
- ChangeLog.md +4/−0
- README.md +1/−1
- Stackage/CompleteBuild.hs +4/−1
- Stackage/Upload.hs +23/−9
- stackage.cabal +1/−1
ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.5.2++* Upload LTS to Hackage with the name LTSHaskell+ ## 0.5.1 * `loadBuildConstraints`
README.md view
@@ -68,7 +68,7 @@ Similarly, if you'd like to perform an entire build, you can replace the last step with: ```-$ docker run -it --rm -v $(pwd):/stackage -w /stackage snoyberg/stackage /bin/bash -c 'cabal update && stackage build --skip-upload'+$ docker run -it --rm -v $(pwd):/stackage -w /stackage snoyberg/stackage /bin/bash -c 'cabal update && stackage nightly --skip-upload' ``` ## Processing
Stackage/CompleteBuild.hs view
@@ -54,6 +54,7 @@ , slug :: Text , setArgs :: Text -> UploadBundle -> UploadBundle , postBuild :: IO ()+ , distroName :: Text -- ^ distro name on Hackage } nightlyPlanFile :: Text -- ^ day@@ -77,6 +78,7 @@ , setArgs = \ghcVer ub -> ub { ubNightly = Just ghcVer } , plan = plan' , postBuild = return ()+ , distroName = "Stackage" } where slug' = "nightly-" ++ day@@ -137,6 +139,7 @@ git ["commit", "-m", "Added new LTS release: " ++ show new] putStrLn "Pushing to Git repository" git ["push"]+ , distroName = "LTSHaskell" } data LTSVer = LTSVer !Int !Int@@ -274,7 +277,7 @@ case map encodeUtf8 $ words $ decodeUtf8 $ either (const "") id ecreds of [username, password] -> do putStrLn "Uploading as Hackage distro"- res2 <- uploadHackageDistro plan username password man+ res2 <- uploadHackageDistroNamed distroName plan username password man putStrLn $ "Distro upload response: " ++ tshow res2 _ -> putStrLn "No creds found, skipping Hackage distro upload"
Stackage/Upload.hs view
@@ -11,6 +11,7 @@ , UploadDocs (..) , uploadDocs , uploadHackageDistro+ , uploadHackageDistroNamed , UploadDocMap (..) , uploadDocMap ) where@@ -149,8 +150,28 @@ -> ByteString -- ^ Hackage password -> Manager -> IO (Response LByteString)-uploadHackageDistro bp username password =- httpLbs (applyBasicAuth username password req)+uploadHackageDistro = uploadHackageDistroNamed "Stackage"++uploadHackageDistroNamed+ :: Text -- ^ distro name+ -> BuildPlan+ -> ByteString -- ^ Hackage username+ -> ByteString -- ^ Hackage password+ -> Manager+ -> IO (Response LByteString)+uploadHackageDistroNamed name bp username password manager = do+ req1 <- parseUrl $ concat+ [ "http://hackage.haskell.org/distro/"+ , unpack name+ , "/packages.csv"+ ]+ let req2 = req1+ { requestHeaders = [("Content-Type", "text/csv")]+ , requestBody = RequestBodyLBS csv+ , checkStatus = \_ _ _ -> Nothing+ , method = "PUT"+ }+ httpLbs (applyBasicAuth username password req2) manager where csv = encodeUtf8 $ builderToLazy@@ -167,13 +188,6 @@ "\",\"http://www.stackage.org/package/" ++ (toBuilder $ display name) ++ "\""-- req = "http://hackage.haskell.org/distro/Stackage/packages.csv"- { requestHeaders = [("Content-Type", "text/csv")]- , requestBody = RequestBodyLBS csv- , checkStatus = \_ _ _ -> Nothing- , method = "PUT"- } data UploadDocMap = UploadDocMap { udmServer :: StackageServer
stackage.cabal view
@@ -1,5 +1,5 @@ name: stackage-version: 0.5.1+version: 0.5.2 synopsis: "Stable Hackage," tools for creating a vetted set of packages from Hackage. description: Please see <http://www.stackage.org/package/stackage> for a description and documentation. homepage: https://github.com/fpco/stackage