From f536e351fa34748cb4fe96c17df23d027566159e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 27 Aug 2013 13:40:19 -0700 Subject: [PATCH] command/build: "end" sentinel in artifact machine-readable output --- CHANGELOG.md | 2 ++ command/build/command.go | 1 + .../docs/machine-readable/command-build.html.markdown | 9 +++++++++ 3 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27fe5f0ee..14f1b1105 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ IMPROVEMENTS: * core: Output message when Ctrl-C received that we're cleaning up. [GH-338] * builder/amazon: Tagging now works with all amazon builder types. * command/build: Machine-readable output now contains build errors, if any. +* command/build: An "end" sentinel is outputted in machine-readable output + for artifact listing so it is easier to know when it is over. BUG FIXES: diff --git a/command/build/command.go b/command/build/command.go index 69d809927..a878627a5 100644 --- a/command/build/command.go +++ b/command/build/command.go @@ -235,6 +235,7 @@ func (c Command) Run(env packer.Environment, args []string) int { ui.Machine("artifact", iStr, "nil") } + ui.Machine("artifact", iStr, "end") env.Ui().Say(message.String()) } } diff --git a/website/source/docs/machine-readable/command-build.html.markdown b/website/source/docs/machine-readable/command-build.html.markdown index 6e56ba63d..848d65c90 100644 --- a/website/source/docs/machine-readable/command-build.html.markdown +++ b/website/source/docs/machine-readable/command-build.html.markdown @@ -61,6 +61,15 @@ of `packer build`.

+
artifact subtype: end (0)
+
+

+ The last machine-readable output line outputted for an artifact. + This is a sentinel value so you know that no more data related to + the targetted artifact will be outputted. +

+
+
artifact subtype: file (2)