cloben 0.1.0.3 → 0.1.1.0
raw patch · 2 files changed
+11/−11 lines, 2 filesdep ~processdep ~temporarydep ~turtle
Dependency ranges changed: process, temporary, turtle
Files
- cloben.cabal +5/−5
- cloben.hs +6/−6
cloben.cabal view
@@ -1,5 +1,5 @@ name: cloben-version: 0.1.0.3+version: 0.1.1.0 synopsis: Clone and benchmark Haskell cabal projects description: @cloben@ is a Haskell shell script transforms @cabal bench@/@stack bench@@@ -10,7 +10,7 @@ Example run of some default @fib@ benchmarks: . @- $ cloben https:\/\/github.com\/sgraf812\/benchmark-test 9982583+ $ cloben https:\/\/github.com\/sgraf812\/benchmark-test e455f05 build\/warnings;1.0 benchmarks\/fib\/10;487.7 benchmarks\/fib\/35;81910000.0@@ -33,12 +33,12 @@ default-language: Haskell2010 build-depends: base >= 4.7 && < 5,- turtle >= 1.2 && < 1.3,+ turtle >= 1.3 && < 1.6, foldl < 2.0, system-filepath >= 0.3.1 && < 0.5, text < 1.3,- temporary >= 1.1 && < 1.3,- process >= 1.1.0.0 && < 1.5+ temporary >= 1.1 && < 1.4,+ process >= 1.1.0.0 && < 1.7 source-repository head type: git
cloben.hs view
@@ -1,5 +1,5 @@ #!/usr/bin/env stack--- stack --resolver lts-5.15 --install-ghc runghc --package turtle+-- stack --resolver lts-11.22 runghc --package turtle {-# LANGUAGE OverloadedStrings #-} {-| This script will automatically clone a given git repository at a specific@@ -55,7 +55,7 @@ return dir Nothing -> pwd metrics <- compileAndBenchmark dir verbose- echo (toCSV metrics)+ printf s (toCSV metrics) parser :: Parser (Maybe (Text, Text), Bool)@@ -97,7 +97,7 @@ cloneRecursiveAndCheckout repo commit dir verbose = do let log text =- when verbose (echo text)+ when verbose (printf (s%"\n") text) -- git seems to pipe to stderr mostly... So it won't pollute our audit log "> git clone <repo> <dir>"@@ -142,7 +142,7 @@ compileAndBenchmark projectDir verbose = do let log text =- when verbose (echo text)+ when verbose (printf (s%"\n") text) cabalBench :: Shell (Text, Text) cabalBench = do@@ -153,7 +153,7 @@ shellAndReportError "cabal configure --enable-benchmark" log log "> cabal bench" -- cabal outputs warnings on stderr and benchmark statistics on stdout- stderr <- fold (inshellWithErr "cabal build" empty) (unlines <$> lefts')+ stderr <- fold (inshellWithErr "cabal build" empty) (linesToText <$> lefts') stdout <- snd <$> shellAndReportError "cabal bench" log return (stderr, stdout) @@ -261,7 +261,7 @@ word :: Pattern Text word =- plus (satisfy (not . isSpace))+ plus (satisfy (/= '\n')) decimalPlaces :: Rational -> Rational decimalPlaces n =