yesod-bin 1.4.4 → 1.4.5
raw patch · 4 files changed
+16/−6 lines, 4 files
Files
- ChangeLog.md +4/−0
- Keter.hs +3/−2
- main.hs +8/−3
- yesod-bin.cabal +1/−1
ChangeLog.md view
@@ -1,3 +1,7 @@+## 1.4.5++* add a switch to yesod to skip deploying a .keter with copy-to [#952](https://github.com/yesodweb/yesod/issues/952)+ ## 1.4.4 * Add and process Keter option 'extraFiles' [#947](https://github.com/yesodweb/yesod/pull/947)
Keter.hs view
@@ -27,8 +27,9 @@ keter :: String -- ^ cabal command -> Bool -- ^ no build?+ -> Bool -- ^ no copy to? -> IO ()-keter cabal noBuild = do+keter cabal noBuild noCopyTo = do ketercfg <- keterConfig mvalue <- decodeFile ketercfg value <-@@ -78,7 +79,7 @@ let fp = T.unpack project ++ ".keter" L.writeFile fp $ compress $ Tar.write archive - case Map.lookup "copy-to" value of+ unless noCopyTo $ case Map.lookup "copy-to" value of Just (String s) -> case parseMaybe (.: "copy-to-port") value of Just i -> run "scp" ["-P" ++ show (i :: Int), fp, T.unpack s]
main.hs view
@@ -60,7 +60,10 @@ } | Test | AddHandler- | Keter { _keterNoRebuild :: Bool }+ | Keter+ { _keterNoRebuild :: Bool+ , _keterNoCopyTo :: Bool+ } | Version deriving (Show, Eq) @@ -96,7 +99,7 @@ Configure -> cabal ["configure"] Build es -> touch' >> cabal ("build":es) Touch -> touch'- Keter noRebuild -> keter (cabalCommand o) noRebuild+ Keter{..} -> keter (cabalCommand o) _keterNoRebuild _keterNoCopyTo Version -> putStrLn ("yesod-bin version: " ++ showVersion Paths_yesod_bin.version) AddHandler -> addHandler Test -> cabalTest cabal@@ -144,7 +147,9 @@ ) keterOptions :: Parser Command-keterOptions = Keter <$> switch ( long "nobuild" <> short 'n' <> help "Skip rebuilding" )+keterOptions = Keter+ <$> switch ( long "nobuild" <> short 'n' <> help "Skip rebuilding" )+ <*> switch ( long "nocopyto" <> help "Ignore copy-to directive in keter config file" ) defaultRescan :: Int defaultRescan = 10
yesod-bin.cabal view
@@ -1,5 +1,5 @@ name: yesod-bin-version: 1.4.4+version: 1.4.5 license: MIT license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>