packages feed

pdf-slave 1.2.1.0 → 1.2.2.0

raw patch · 3 files changed

+14/−5 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,8 @@+1.2.2.0+=======++* Always copy input file to `<template_name>_input.json`.+ 1.2.1.0 ======= 
pdf-slave.cabal view
@@ -1,5 +1,5 @@ name:                pdf-slave-version:             1.2.1.0+version:             1.2.2.0 synopsis:            Tool to generate PDF from haskintex templates and YAML input description:         Please see README.md homepage:            https://github.com/NCrashed/pdf-slave#readme
src/Text/PDF/Slave/Render.hs view
@@ -20,7 +20,7 @@   , parseBundleOrTemplateFromFile   ) where -import Control.Monad (join)+import Control.Monad (join, forM_) import Control.Monad.Catch import Data.Aeson (Value(..)) import Data.ByteString (ByteString)@@ -185,13 +185,17 @@         , toTextArg $ baseDir </> bodyName ]         ++ templateFileHaskintexOpts   -- input file might be missing, if missing we can inject input from parent+  let outputFixedInputName = outputFolder </> (templateFileName <> "_input") <.> "json"   case templateFileInput of     Nothing -> whenJust minput $ \input -> do-      let filename = outputFolder </> (templateFileName <> "_input") <.> "json"-      writeBinary filename $ BZ.toStrict . A.encode $ input+      writeBinary outputFixedInputName $ BZ.toStrict . A.encode $ input     Just inputName -> do       let inputPath = baseDir </> inputName-      cp inputPath $ outputFolder </> inputName+      -- copy in two places as the user might expect that input name would be equal+      -- to specified in template file and copy to standard place in case of unpacked+      -- bundle behavior.+      let outputInputPaths = [outputFolder </> inputName, outputFixedInputName]+      forM_ outputInputPaths $ cp inputPath   _ <- chdir outputFolder haskintex   return $ F.foldMap id depFlags -- merge flags