@@ -263,12 +264,34 @@ func (s *Scaffold) createChart(w *wkspace.Workspace, name string) error {
returnutils.HighlightError(fmt.Errorf("No charts installed for this repository, you might need to run `plural bundle install %s <bundle-name>`",repo.Name))
}
version:="0.10"
filename:=filepath.Join(s.Root,ChartfileName)
ifutils.Exists(filename){
content,err:=ioutil.ReadFile(filename)
iferr!=nil{
returnutils.ErrorWrap(err,"Failed to read existing Chart.yaml")
}
chart:=chart{}
iferr:=yaml.Unmarshal(content,&chart);err!=nil{
returnutils.ErrorWrap(err,"Existing Chart.yaml has invalid yaml formatting")
}
sv,err:=semver.NewVersion(chart.Version)
iferr!=nil{
returnutils.ErrorWrap(err,"Existing Chart.yaml version invalid semver format")
}
sv.BumpPatch()
version=sv.String()
}
appVersion:=appVersion(w.Charts)
chart:=&chart{
ApiVersion:"v2",
Name:repo.Name,
Description:fmt.Sprintf("A helm chart for %s",repo.Name),
Version:"0.1.0",
Version:version,
AppVersion:appVersion,
Dependencies:s.chartDependencies(w,name),
}
...
...
@@ -278,7 +301,7 @@ func (s *Scaffold) createChart(w *wkspace.Workspace, name string) error {