craftr-build-4.x icon indicating copy to clipboard operation
craftr-build-4.x copied to clipboard

Update command-line interface

Open NiklasRosenstein opened this issue 6 years ago • 0 comments

Currently the Craftr CLI makes heavy use of flags to allow the incorparation of multiple steps. Most commonly --configure and --build is mixed. But positional arguments can not be properly specified for in a multi-staged command. Currently there is only --build and --clean for which it makes sense to take the same positional arguments if both are used at the same time, but if we introduce new stages which use different positional arguments, combining them in a single command becomes difficult.

Positional arguments in the Craftr CLI should be context sensitive depending on previously specified flags. For example, after --configure you should be able to specify options, but after --build or --clean you should be able to specify targets. Example:

craftr -configure osx:minversion=10.11 -build main:cxx.run -clean @build

It should also be possible to more easily group arguments for stages, eg. when specifying additional flags for the ninja backend:

craftr -ninja [ -v ] -build

(The spaces around -v should not matter)

NiklasRosenstein avatar Sep 14 '18 23:09 NiklasRosenstein