Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
b4844383
Commit
b4844383
authored
May 20, 2016
by
Michelle Noorali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ref(helm): digest -> checksum in index file
parent
447ce5a2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
index.go
pkg/repo/index.go
+1
-1
repo.go
pkg/repo/repo.go
+3
-3
repo_test.go
pkg/repo/repo_test.go
+2
-2
No files found.
pkg/repo/index.go
View file @
b4844383
...
@@ -23,7 +23,7 @@ type ChartRef struct {
...
@@ -23,7 +23,7 @@ type ChartRef struct {
URL
string
`yaml:"url"`
URL
string
`yaml:"url"`
Created
string
`yaml:"created,omitempty"`
Created
string
`yaml:"created,omitempty"`
Removed
bool
`yaml:"removed,omitempty"`
Removed
bool
`yaml:"removed,omitempty"`
Digest
string
`yaml:"digest
,omitempty"`
Checksum
string
`yaml:"checksum
,omitempty"`
Chartfile
chart
.
Chartfile
`yaml:"chartfile"`
Chartfile
chart
.
Chartfile
`yaml:"chartfile"`
}
}
...
...
pkg/repo/repo.go
View file @
b4844383
...
@@ -117,7 +117,7 @@ func (r *ChartRepository) Index() error {
...
@@ -117,7 +117,7 @@ func (r *ChartRepository) Index() error {
}
}
chartfile
:=
ch
.
Chartfile
()
chartfile
:=
ch
.
Chartfile
()
hash
,
err
:=
generate
Digest
(
path
)
hash
,
err
:=
generate
Checksum
(
path
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -137,7 +137,7 @@ func (r *ChartRepository) Index() error {
...
@@ -137,7 +137,7 @@ func (r *ChartRepository) Index() error {
url
:=
filepath
.
Join
(
r
.
URL
,
key
+
".tgz"
)
url
:=
filepath
.
Join
(
r
.
URL
,
key
+
".tgz"
)
entry
:=
&
ChartRef
{
Chartfile
:
*
chartfile
,
Name
:
chartfile
.
Name
,
URL
:
url
,
Created
:
created
,
Digest
:
hash
,
Removed
:
false
}
entry
:=
&
ChartRef
{
Chartfile
:
*
chartfile
,
Name
:
chartfile
.
Name
,
URL
:
url
,
Created
:
created
,
Checksum
:
hash
,
Removed
:
false
}
r
.
IndexFile
.
Entries
[
key
]
=
entry
r
.
IndexFile
.
Entries
[
key
]
=
entry
...
@@ -150,7 +150,7 @@ func (r *ChartRepository) Index() error {
...
@@ -150,7 +150,7 @@ func (r *ChartRepository) Index() error {
return
nil
return
nil
}
}
func
generate
Digest
(
path
string
)
(
string
,
error
)
{
func
generate
Checksum
(
path
string
)
(
string
,
error
)
{
f
,
err
:=
os
.
Open
(
path
)
f
,
err
:=
os
.
Open
(
path
)
if
err
!=
nil
{
if
err
!=
nil
{
return
""
,
err
return
""
,
err
...
...
pkg/repo/repo_test.go
View file @
b4844383
...
@@ -69,8 +69,8 @@ func TestIndex(t *testing.T) {
...
@@ -69,8 +69,8 @@ func TestIndex(t *testing.T) {
}
}
timestamps
[
chartName
]
=
details
.
Created
timestamps
[
chartName
]
=
details
.
Created
if
details
.
Digest
==
""
{
if
details
.
Checksum
==
""
{
t
.
Errorf
(
"
Digest
was not set for %s"
,
chartName
)
t
.
Errorf
(
"
Checksum
was not set for %s"
,
chartName
)
}
}
}
}
...
...
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