module B9.Shake.Actions
( b9InvocationAction,
buildB9File,
)
where
import B9
import Control.Lens ((?~))
import Development.Shake
import GHC.Stack
b9InvocationAction :: HasCallStack => B9ConfigAction a -> B9ConfigOverride -> Action a
b9InvocationAction x y = liftIO (runB9ConfigActionWithOverrides x y)
buildB9File :: HasCallStack => FilePath -> FilePath -> [String] -> Action String
buildB9File b9Root b9File args = do
let f = b9Root </> b9File
need [f]
liftIO
( runB9ConfigAction
( addLocalPositionalArguments
args
(localB9Config (projectRoot ?~ b9Root) (runBuildArtifacts [f]))
)
)