improve formatting and documentation for PR#6784
This commit is contained in:
parent
12496e3702
commit
2884f6fab6
|
@ -309,7 +309,7 @@ Options:
|
|||
-machine-readable Machine-readable output
|
||||
-on-error=[cleanup|abort|ask] If the build fails do: clean up (default), abort, or ask
|
||||
-parallel=false Disable parallelization (on by default)
|
||||
-timestamp=true Enable timestamps in build log (off by default)
|
||||
-timestamp-ui=true Prefix each ui output with an RFC3339 timestamp (off by default).
|
||||
-var 'key=value' Variable for templates, can be used multiple times.
|
||||
-var-file=path JSON file containing user variables.
|
||||
`
|
||||
|
|
16
packer/ui.go
16
packer/ui.go
|
@ -99,14 +99,6 @@ type MachineReadableUi struct {
|
|||
|
||||
var _ Ui = new(MachineReadableUi)
|
||||
|
||||
// TimestampedUi is a UI that wraps another UI implementation and prefixes
|
||||
// prefixes each message with an RFC3339 timestamp
|
||||
type TimestampedUi struct {
|
||||
Ui Ui
|
||||
}
|
||||
|
||||
var _ Ui = new(TimestampedUi)
|
||||
|
||||
func (u *ColoredUi) Ask(query string) (string, error) {
|
||||
return u.Ui.Ask(u.colorize(query, u.Color, true))
|
||||
}
|
||||
|
@ -351,6 +343,14 @@ func (u *MachineReadableUi) ProgressBar() ProgressBar {
|
|||
return new(NoopProgressBar)
|
||||
}
|
||||
|
||||
// TimestampedUi is a UI that wraps another UI implementation and prefixes
|
||||
// prefixes each message with an RFC3339 timestamp
|
||||
type TimestampedUi struct {
|
||||
Ui Ui
|
||||
}
|
||||
|
||||
var _ Ui = new(TimestampedUi)
|
||||
|
||||
func (u *TimestampedUi) Ask(query string) (string, error) {
|
||||
return u.Ui.Ask(query)
|
||||
}
|
||||
|
|
|
@ -50,8 +50,8 @@ that are created will be outputted at the end of the build.
|
|||
- `-parallel=false` - Disable parallelization of multiple builders (on by
|
||||
default).
|
||||
|
||||
- `-timestamp=true` - Enable timestamps for build logs without adding the extra
|
||||
information included if PACKER_LOG is true.
|
||||
- `-timestamp-ui=true` - Prefix each ui output with an RFC3339 timestamp (off
|
||||
by default).
|
||||
|
||||
- `-var` - Set a variable in your packer template. This option can be used
|
||||
multiple times. This is useful for setting version numbers for your build.
|
||||
|
|
Loading…
Reference in New Issue