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
6511b189
Commit
6511b189
authored
Sep 22, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scripts: build.sh compiles all Packer components in parallel
parent
3eb74424
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
scripts/build.sh
scripts/build.sh
+23
-0
No files found.
scripts/build.sh
View file @
6511b189
...
...
@@ -35,21 +35,44 @@ fi
echo
-e
"
${
OK_COLOR
}
--> Installing dependencies to speed up builds...
${
NO_COLOR
}
"
go get ./...
# This function waits for all background tasks to complete
waitAll
()
{
RESULT
=
0
for
job
in
`
jobs
-p
`
;
do
wait
$job
if
[
$?
-ne
0
]
;
then
RESULT
=
1
fi
done
if
[
$RESULT
-ne
0
]
;
then
exit
$RESULT
fi
}
echo
-e
"
${
OK_COLOR
}
--> NOTE: Compilation of components will be done in parallel.
${
NO_COLOR
}
"
# Compile the main Packer app
echo
-e
"
${
OK_COLOR
}
--> Compiling Packer
${
NO_COLOR
}
"
(
go build
\
${
PACKER_RACE
}
\
-ldflags
"-X github.com/mitchellh/packer/packer.GitCommit
${
GIT_COMMIT
}${
GIT_DIRTY
}
"
\
-v
\
-o
bin/packer
${
EXTENSION
}
.
)
&
# Go over each plugin and build it
for
PLUGIN
in
$(
find ./plugin
-mindepth
1
-maxdepth
1
-type
d
)
;
do
PLUGIN_NAME
=
$(
basename
${
PLUGIN
}
)
echo
-e
"
${
OK_COLOR
}
--> Compiling Plugin:
${
PLUGIN_NAME
}${
NO_COLOR
}
"
(
go build
\
${
PACKER_RACE
}
\
-ldflags
"-X github.com/mitchellh/packer/packer.GitCommit
${
GIT_COMMIT
}${
GIT_DIRTY
}
"
\
-v
\
-o
bin/packer-
${
PLUGIN_NAME
}${
EXTENSION
}
${
PLUGIN
}
)
&
done
waitAll
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