26 lines
540 B
Haskell
Raw Permalink Normal View History

module Main where
import MiniStatePlanner.Plan
( parseRequest
, planDeployments
, renderPlan
)
import System.Environment (getArgs)
import System.Exit (die)
main :: IO ()
main = do
args <- getArgs
let requestArgs =
case args of
[] ->
[ "api:production:3"
, "worker:staging:1"
, "cache:production:2"
]
_ -> args
case traverse parseRequest requestArgs of
Left err -> die err
Right requests -> putStrLn (renderPlan (planDeployments requests))