Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
aee07999
Commit
aee07999
authored
Jun 03, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command/build: Colors!
parent
f041ebb2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
command/build/command.go
command/build/command.go
+20
-2
No files found.
command/build/command.go
View file @
aee07999
...
...
@@ -59,13 +59,31 @@ func (c Command) Run(env packer.Environment, args []string) int {
}
// Compile all the UIs for the builds
colors
:=
[
5
]
packer
.
UiColor
{
packer
.
UiColorGreen
,
packer
.
UiColorYellow
,
packer
.
UiColorBlue
,
packer
.
UiColorMagenta
,
packer
.
UiColorCyan
,
}
buildUis
:=
make
(
map
[
string
]
packer
.
Ui
)
for
_
,
b
:=
range
builds
{
buildUis
[
b
.
Name
()]
=
&
packer
.
PrefixedUi
{
for
i
,
b
:=
range
builds
{
var
ui
packer
.
Ui
ui
=
&
packer
.
PrefixedUi
{
fmt
.
Sprintf
(
"==> %s"
,
b
.
Name
()),
fmt
.
Sprintf
(
" %s"
,
b
.
Name
()),
env
.
Ui
(),
}
ui
=
&
packer
.
ColoredUi
{
colors
[
i
%
len
(
colors
)],
ui
,
}
buildUis
[
b
.
Name
()]
=
ui
ui
.
Say
(
fmt
.
Sprintf
(
"%s output will be in this color."
,
b
.
Name
()))
}
// Prepare all the builds
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment