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
7009c3c3
Commit
7009c3c3
authored
Oct 25, 2016
by
Matt Butcher
Committed by
GitHub
Oct 25, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1453 from technosophos/fix/792-serve-update-index
fix(helm): create index file as 'helm serve' starts up.
parents
9b31ad48
dce2079b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
serve.go
cmd/helm/serve.go
+12
-3
No files found.
cmd/helm/serve.go
View file @
7009c3c3
...
...
@@ -28,11 +28,16 @@ import (
"k8s.io/helm/pkg/repo"
)
const
serveDesc
=
`This command starts a local chart repository server that serves charts from a local directory.`
const
serveDesc
=
`
This command starts a local chart repository server that serves charts from a local directory.
The new server will provide HTTP access to a repository. By default, it will
scan all of the charts in '$HELM_HOME/repository/local' and serve those over
the a local IPv4 TCP port (default '127.0.0.1:8879').
`
type
serveCmd
struct
{
out
io
.
Writer
home
helmpath
.
Home
address
string
repoPath
string
}
...
...
@@ -44,7 +49,6 @@ func newServeCmd(out io.Writer) *cobra.Command {
Short
:
"start a local http web server"
,
Long
:
serveDesc
,
RunE
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
srv
.
home
=
helmpath
.
Home
(
homePath
())
return
srv
.
run
()
},
}
...
...
@@ -65,6 +69,11 @@ func (s *serveCmd) run() error {
return
err
}
fmt
.
Fprintln
(
s
.
out
,
"Regenerating index. This may take a moment."
)
if
err
:=
index
(
repoPath
,
"http://"
+
s
.
address
,
""
);
err
!=
nil
{
return
err
}
fmt
.
Fprintf
(
s
.
out
,
"Now serving you on %s
\n
"
,
s
.
address
)
return
repo
.
StartLocalRepo
(
repoPath
,
s
.
address
)
}
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