git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix psc-publish --dry-run (#2612)

This fixes one of the two problems mentioned in #2610, that psc-publish --dry-run is broken. I also removed a misleading error message from the psc-publish tests (we no longer use git submodules for retrieving purescript libraries for running tests with).

commit480d7e98f06722c63887076ec8b55c17ee02e270 authorHarry Garrood <harry@garrood.me> dateTue 31 Jan 2017, 16:59 (10 years ago) parent12c18ae
3 files changed+6−10
psc-publish/Main.hs+3 purescript.cabal+3−1 tests/TestPscPublish.hs−9
psc-publish/Main.hs+3
@@ -2,10 +2,12 @@
22
33module Main where
44
5+import Control.Monad.IO.Class (liftIO)
56import Data.Version (Version(..), showVersion)
67import qualified Data.Aeson as A
78import qualified Data.ByteString.Lazy.Char8 as BL
89import Data.Monoid ((<>))
10+import Data.Time.Clock (getCurrentTime)
911
1012import Options.Applicative (Parser, ParseError (..))
1113import qualified Options.Applicative as Opts
@@ -25,6 +27,7 @@ dryRunOptions :: PublishOptions
2527dryRunOptions = defaultPublishOptions
2628 { publishGetVersion = return dummyVersion
2729 , publishWorkingTreeDirty = warn DirtyWorkingTree_Warn
30+ , publishGetTagTime = const (liftIO getCurrentTime)
2831 }
2932 where dummyVersion = ("0.0.0", Version [0,0,0] [])
3033
purescript.cabal+3−1
@@ -424,7 +424,9 @@ executable psc-publish
424424 purescript -any,
425425 aeson >= 0.8 && < 1.0,
426426 bytestring -any,
427− optparse-applicative -any
427+ optparse-applicative -any,
428+ time -any,
429+ transformers -any
428430 main-is: Main.hs
429431 other-modules: Paths_purescript
430432 buildable: True
tests/TestPscPublish.hs−9
@@ -61,13 +61,4 @@ testPackage dir = pushd dir $ do
6161 print other
6262 exitFailure
6363 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
7364 preparePackageError e = Publish.printErrorToStdout e >> exitFailure