test
This commit is contained in:
@@ -8,16 +8,16 @@ import (
|
||||
"oc-deploy/helm"
|
||||
)
|
||||
|
||||
type HelmInstallData struct {
|
||||
type HelmInstall struct {
|
||||
obj ToolData
|
||||
tmp string
|
||||
}
|
||||
|
||||
func (this HelmInstallData) Get() (ToolData) {
|
||||
func (this HelmInstall) Get() (ToolData) {
|
||||
return this.obj
|
||||
}
|
||||
|
||||
func (this HelmInstallData) Download() (error) {
|
||||
func (this HelmInstall) Download() (error) {
|
||||
|
||||
bin_dir := this.obj.Bin
|
||||
err2 := os.MkdirAll(bin_dir, os.ModePerm)
|
||||
@@ -35,7 +35,9 @@ func (this HelmInstallData) Download() (error) {
|
||||
|
||||
r, _ := os.Open(tmp_file)
|
||||
err1 := utils.ExtractTarGz(bin_dir, r)
|
||||
if err1 != nil {return err1}
|
||||
if err1 != nil {
|
||||
return err1
|
||||
}
|
||||
|
||||
os.Remove(tmp_file)
|
||||
|
||||
@@ -48,7 +50,7 @@ func (this HelmInstallData) Download() (error) {
|
||||
}
|
||||
|
||||
///////////////
|
||||
func (this HelmInstallData) Version(path string) (string, error) {
|
||||
func (this HelmInstall) Version(path string) (string, error) {
|
||||
cmd := helm.HelmCommand{Bin: path}
|
||||
cmd.New()
|
||||
return cmd.GetVersion()
|
||||
|
Reference in New Issue
Block a user