https://github.com/marco-m/otium
- Support user context via
Step.Run(bag Bag, uctx any) error
- Support pre-flight checks via
ProcedureOpts.PreFlight() (any, error)
- When invoked with
--doc-only
, an otium procedure prints the documentation instead of running.
Procedure.Execute
: change signature toExecute(args []string) error
, to ease testing. Normally you would use this aspcd.Execute(os.Args)
.Step.Run
: change signature toRun func(bag Bag, uctx any) error
- When invoked with -h, an otium procedure prints also the otium version.
- Bag: all variables are automatically settable also as command-line flags (see README and examples/cliflags).
- Procedure.AddStep: new field Vars, to declare all the k/v for the Bag. This replaces the majority of behaviors of Bag.
- Table of Contents: each step is marked 🤖 (bot) if automated or 🤠 (human) if manual.
- Bag.Get: modified from
Bag.Get(key string, desc string)
toBag.Get(key string)
, since now the description goes into the Vars field of Procedure.AddStep. - Bag.Get: now it behaves as GetNoAsk: it is never interactive.
- Bag.GetValidate: removed, since now the validator function goes into the Vars field of Procedure.AddStep.
- Bag.GetNoAsk: removed, since now the validator function goes into the Vars field of Procedure.AddStep.
- Step: the Run user function is now optional.
- Bag: add GetNoAsk method
- New command
variables
to show the contents of the procedure bag
- Step.Description: render bag values with Go template
- Bag: add GetValidate method
- CI: add CI, build on https://cirrus-ci.org/
- Add ErrUnrecoverable (sentinel)
- Add CHANGELOG
- Bag.Get: suggest the key to complete
First release.