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
7eb8daaa
Commit
7eb8daaa
authored
May 23, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Much better Makefile coupled with shell script
parent
edf4bdf8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
38 deletions
+24
-38
Makefile
Makefile
+5
-10
build.sh
build.sh
+19
-0
plugin/builder-amazon-ebs/Makefile
plugin/builder-amazon-ebs/Makefile
+0
-15
plugin/command-build/Makefile
plugin/command-build/Makefile
+0
-13
No files found.
Makefile
View file @
7eb8daaa
...
@@ -3,23 +3,18 @@ OK_COLOR=\x1b[32;01m
...
@@ -3,23 +3,18 @@ OK_COLOR=\x1b[32;01m
ERROR_COLOR
=
\x
1b[31
;
01m
ERROR_COLOR
=
\x
1b[31
;
01m
WARN_COLOR
=
\x
1b[33
;
01m
WARN_COLOR
=
\x
1b[33
;
01m
export
ROOTDIR
=
$(CURDIR)
all
:
all
:
@
mkdir
-p
bin/
@
mkdir
-p
bin/
go get
-d
-v
./...
@
echo
"
$(OK_COLOR)
==> Installing dependencies
$(NO_COLOR)
"
@
echo
"
$(OK_COLOR)
--> Compiling Packer...
$(NO_COLOR)
"
@
go get
-d
-v
./...
go build
-v
-o
bin/packer
@
echo
"
$(OK_COLOR)
==> Building
$(NO_COLOR)
"
@
echo
"
$(OK_COLOR)
--> Compiling Builder: Amazon EBS...
$(NO_COLOR)
"
@
./build.sh
$(MAKE)
-C
plugin/builder-amazon-ebs
@
echo
"
$(OK_COLOR)
--> Compiling Command: Build...
$(NO_COLOR)
"
$(MAKE)
-C
plugin/command-build
format
:
format
:
go
fmt
./...
go
fmt
./...
test
:
test
:
@
echo
"
$(OK_COLOR)
--
> Testing Packer...
$(NO_COLOR)
"
@
echo
"
$(OK_COLOR)
==
> Testing Packer...
$(NO_COLOR)
"
@
go list
-f
'{{range .TestImports}}{{.}}\
@
go list
-f
'{{range .TestImports}}{{.}}\
{{end}}'
./... | xargs
-n1
go get
-d
{{end}}'
./... | xargs
-n1
go get
-d
go
test
./...
go
test
./...
...
...
build.sh
0 → 100755
View file @
7eb8daaa
#!/bin/sh
set
-e
NO_COLOR
=
"
\x
1b[0m"
OK_COLOR
=
"
\x
1b[32;01m"
ERROR_COLOR
=
"
\x
1b[31;01m"
WARN_COLOR
=
"
\x
1b[33;01m"
# Compile the main Packer app
echo
"
${
OK_COLOR
}
--> Compiling Packer
${
NO_COLOR
}
"
go build
-v
-o
bin/packer
.
# Go over each plugin and build it
for
PLUGIN
in
$(
find ./plugin
-type
d
-mindepth
1
-maxdepth
1
)
;
do
PLUGIN_NAME
=
$(
basename
${
PLUGIN
}
)
echo
"
${
OK_COLOR
}
--> Compiling Plugin:
${
PLUGIN_NAME
}${
NO_COLOR
}
"
go build
-v
-o
bin/packer-
${
PLUGIN_NAME
}
${
PLUGIN
}
done
plugin/builder-amazon-ebs/Makefile
deleted
100644 → 0
View file @
edf4bdf8
PLUGIN_NAME
=
packer-builder-amazon-ebs
plugin
:
go get
-d
-v
./...
go build
-v
-o
$(ROOTDIR)
/bin/
$(PLUGIN_NAME)
format
:
go
fmt
./...
test
:
@
go list
-f
'{{range .TestImports}}{{.}}\
{{end}}'
./... | xargs
-n1
go get
-d
go
test
./...
.PHONY
:
all format test
plugin/command-build/Makefile
deleted
100644 → 0
View file @
edf4bdf8
plugin
:
go get
-d
-v
./...
go build
-v
-o
$(ROOTDIR)
/bin/packer-command-build
format
:
go
fmt
./...
test
:
@
go list
-f
'{{range .TestImports}}{{.}}\
{{end}}'
./... | xargs
-n1
go get
-d
go
test
./...
.PHONY
:
all format test
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