Hi, the sbt MEAP shows how to use SBT commands that run a chain of tasks. What if my command takes command line arguments, which I want to validate early and pass on to a subtask?
For example, I might have a deploy command that takes an argument specifying a destination server. First I want to validate the arguments, then I want to make sure the git repository is clean, then I want to compile and stage the application, and finally I want to deploy the application--using the arguments that were passed into the command.
Would I create a task to validate the arguments, and then create a task string later on with args.mkString(" ")? I.e. my task chain would be:
("validate " + args.mkString(" ")) :: ensureGitClean :: clean :: stage :: ("deploy " + args.mkString(" "))
Or is there a better way?
Peace. Michael