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
45484951
Commit
45484951
authored
Jan 09, 2014
by
Mark Rushakoff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
StepDownload uses packer version as user agent
parent
9e5c0f6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
common/step_download.go
common/step_download.go
+1
-0
packer/version.go
packer/version.go
+10
-6
No files found.
common/step_download.go
View file @
45484951
...
...
@@ -70,6 +70,7 @@ func (s *StepDownload) Run(state multistep.StateBag) multistep.StepAction {
CopyFile
:
false
,
Hash
:
HashForType
(
s
.
ChecksumType
),
Checksum
:
checksum
,
UserAgent
:
packer
.
VersionString
(),
}
path
,
err
,
retry
:=
s
.
download
(
config
,
state
)
...
...
packer/version.go
View file @
45484951
...
...
@@ -31,6 +31,15 @@ func (versionCommand) Run(env Environment, args []string) int {
env
.
Ui
()
.
Machine
(
"version-prelease"
,
VersionPrerelease
)
env
.
Ui
()
.
Machine
(
"version-commit"
,
GitCommit
)
env
.
Ui
()
.
Say
(
VersionString
())
return
0
}
func
(
versionCommand
)
Synopsis
()
string
{
return
"print Packer version"
}
func
VersionString
()
string
{
var
versionString
bytes
.
Buffer
fmt
.
Fprintf
(
&
versionString
,
"Packer v%s"
,
Version
)
if
VersionPrerelease
!=
""
{
...
...
@@ -41,10 +50,5 @@ func (versionCommand) Run(env Environment, args []string) int {
}
}
env
.
Ui
()
.
Say
(
versionString
.
String
())
return
0
}
func
(
versionCommand
)
Synopsis
()
string
{
return
"print Packer version"
return
versionString
.
String
()
}
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