git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix psc-publish --dry-run (#2612)
480d7e9Harry Garrood
psc-publish/Main.hs+3
@@ -2,10 +2,12 @@
2
2
3module Main where
3module Main where
4
4
5+import Control.Monad.IO.Class (liftIO)
5import Data.Version (Version(..), showVersion)
6import Data.Version (Version(..), showVersion)
6import qualified Data.Aeson as A
7import qualified Data.Aeson as A
7import qualified Data.ByteString.Lazy.Char8 as BL
8import qualified Data.ByteString.Lazy.Char8 as BL
8import Data.Monoid ((<>))
9import Data.Monoid ((<>))
10+import Data.Time.Clock (getCurrentTime)
9
11
10import Options.Applicative (Parser, ParseError (..))
12import Options.Applicative (Parser, ParseError (..))
11import qualified Options.Applicative as Opts
13import qualified Options.Applicative as Opts
@@ -25,6 +27,7 @@ dryRunOptions :: PublishOptions
25dryRunOptions = defaultPublishOptions
27dryRunOptions = defaultPublishOptions
26 { publishGetVersion = return dummyVersion
28 { publishGetVersion = return dummyVersion
27 , publishWorkingTreeDirty = warn DirtyWorkingTree_Warn
29 , publishWorkingTreeDirty = warn DirtyWorkingTree_Warn
30+ , publishGetTagTime = const (liftIO getCurrentTime)
28 }
31 }
29 where dummyVersion = ("0.0.0", Version [0,0,0] [])
32 where dummyVersion = ("0.0.0", Version [0,0,0] [])
30
33
purescript.cabal+3−1
@@ -424,7 +424,9 @@ executable psc-publish
424 purescript -any,
424 purescript -any,
425 aeson >= 0.8 && < 1.0,
425 aeson >= 0.8 && < 1.0,
426 bytestring -any,
426 bytestring -any,
427− optparse-applicative -any
427+ optparse-applicative -any,
428+ time -any,
429+ transformers -any
428 main-is: Main.hs
430 main-is: Main.hs
429 other-modules: Paths_purescript
431 other-modules: Paths_purescript
430 buildable: True
432 buildable: True
tests/TestPscPublish.hs−9
@@ -61,13 +61,4 @@ testPackage dir = pushd dir $ do
61 print other
61 print other
62 exitFailure
62 exitFailure
63 where
63 where
64− preparePackageError e@(UserError BowerJSONNotFound) = do
65− Publish.printErrorToStdout e
66− putStrLn ""
67− putStrLn "=========================================="
68− putStrLn "Did you forget to update the submodules?"
69− putStrLn "$ git submodule sync; git submodule update"
70− putStrLn "=========================================="
71− putStrLn ""
72− exitFailure
73 preparePackageError e = Publish.printErrorToStdout e >> exitFailure
64 preparePackageError e = Publish.printErrorToStdout e >> exitFailure