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
91ade277
Commit
91ade277
authored
May 07, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create the build command/plugin
parent
399d8ab0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
9 deletions
+37
-9
Makefile
Makefile
+9
-0
command/build/command.go
command/build/command.go
+2
-2
command/build/command_test.go
command/build/command_test.go
+3
-0
command/build/main.go
command/build/main.go
+0
-7
plugin/command-build/Makefile
plugin/command-build/Makefile
+13
-0
plugin/command-build/bin/packer-build
plugin/command-build/bin/packer-build
+0
-0
plugin/command-build/main.go
plugin/command-build/main.go
+10
-0
No files found.
Makefile
View file @
91ade277
NO_COLOR
=
\x
1b[0m
OK_COLOR
=
\x
1b[32
;
01m
ERROR_COLOR
=
\x
1b[31
;
01m
WARN_COLOR
=
\x
1b[33
;
01m
all
:
@
mkdir
-p
bin/
go get
-d
-v
./...
@
echo
"
$(OK_COLOR)
--> Compiling Packer...
$(NO_COLOR)
"
go build
-v
-o
bin/packer
@
echo
"
$(OK_COLOR)
--> Compiling Command: Build...
$(NO_COLOR)
"
$(MAKE)
-C
plugin/command-build
format
:
go
fmt
./...
test
:
@
echo
"
$(OK_COLOR)
--> Testing Packer...
$(NO_COLOR)
"
@
go list
-f
'{{range .TestImports}}{{.}}\
{{end}}'
./... | xargs
-n1
go get
-d
go
test
./...
...
...
command/build/command.go
View file @
91ade277
package
main
package
build
import
"github.com/mitchellh/packer/packer"
type
build
Command
byte
type
Command
byte
func
(
Command
)
Run
(
env
packer
.
Environment
,
arg
[]
string
)
int
{
env
.
Ui
()
.
Say
(
"BUILDING!"
)
...
...
command/build/command_test.go
0 → 100644
View file @
91ade277
package
build
command/build/main.go
deleted
100644 → 0
View file @
399d8ab0
package
main
import
"github.com/mitchellh/packer/packer/plugin"
func
main
()
{
plugin
.
ServeCommand
(
new
(
buildCommand
))
}
plugin/command-build/Makefile
0 → 100644
View file @
91ade277
plugin
:
go get
-d
-v
./...
go build
-v
-o
$(CURDIR)
/bin/packer-build
format
:
go
fmt
./...
test
:
@
go list
-f
'{{range .TestImports}}{{.}}\
{{end}}'
./... | xargs
-n1
go get
-d
go
test
./...
.PHONY
:
all format test
plugin/command-build/bin/packer-build
0 → 100755
View file @
91ade277
File added
plugin/command-build/main.go
0 → 100644
View file @
91ade277
package
main
import
(
"github.com/mitchellh/packer/command/build"
"github.com/mitchellh/packer/packer/plugin"
)
func
main
()
{
plugin
.
ServeCommand
(
new
(
build
.
Command
))
}
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