@ -21,6 +21,7 @@ import (
"fmt"
"fmt"
"io/ioutil"
"io/ioutil"
"os"
"os"
"regexp"
"syscall"
"syscall"
"github.com/Masterminds/semver/v3"
"github.com/Masterminds/semver/v3"
@ -61,6 +62,10 @@ func (p *Package) Run(path string, vals map[string]interface{}) (string, error)
return "" , err
return "" , err
}
}
if matched , _ := regexp . MatchString ( "^[[:lower:][:digit:]-]+$" , ch . Name ( ) ) ; ! matched {
return "" , errors . New ( fmt . Sprintf ( "Invalid chart name \"%s\". Chart names must be lower case letters and numbers with optionally dashes (-) for separator\n" , ch . Name ( ) ) )
}
// If version is set, modify the version.
// If version is set, modify the version.
if p . Version != "" {
if p . Version != "" {
ch . Metadata . Version = p . Version
ch . Metadata . Version = p . Version