Skip to content

Commit b4f5ef7

Browse files
authored
Merge pull request #504 from kool-dev/fix-lint-fallback
fix lint + fix regression on cloud config legacy file
2 parents 99eb85e + cfee540 commit b4f5ef7

File tree

5 files changed

+9
-14
lines changed

5 files changed

+9
-14
lines changed

commands/cloud_deploy.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ import (
1717
"github.com/spf13/cobra"
1818
)
1919

20-
const (
21-
koolDeployEnv = "kool.deploy.env"
22-
)
23-
2420
// KoolCloudDeployFlags holds the flags for the kool cloud deploy command
2521
type KoolCloudDeployFlags struct {
2622
// Token string // env: KOOL_API_TOKEN

services/cloud/api/deploy_create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func NewDeployCreate() (c *DeployCreate) {
4141
}
4242

4343
c.SetPath("deploy/create")
44-
c.PostField("is_local", "1")
44+
_ = c.PostField("is_local", "1")
4545

4646
return
4747
}

services/cloud/api/endpoint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func (e *DefaultEndpoint) DoCall() (err error) {
159159
err = e.mockErr
160160
if e.mockResp != nil {
161161
raw, _ := json.Marshal(e.mockResp)
162-
json.Unmarshal(raw, e.response)
162+
_ = json.Unmarshal(raw, e.response)
163163
}
164164
return
165165
}

services/cloud/deploy_validator.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ func ParseCloudConfig(workingDir string, koolDeployFile string) (deployConfig *D
8888
err = fmt.Errorf("could not find required file '%s' on current working directory: %v", koolDeployFile, err)
8989
return
9090
}
91-
92-
koolDeployFile = "kool.deploy.yml"
93-
return
9491
}
9592

9693
if content, err = os.ReadFile(path); err != nil {

services/cloud/deployer.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ func NewDeployer() *Deployer {
2525
func (d *Deployer) CreateDeploy(tarballPath string) (resp *api.DeployCreateResponse, err error) {
2626
var create = api.NewDeployCreate()
2727

28-
create.PostFile("deploy", tarballPath, "deploy.tgz")
28+
if err = create.PostFile("deploy", tarballPath, "deploy.tgz"); err != nil {
29+
return
30+
}
2931

30-
create.PostField("cluster", d.env.Get("KOOL_CLOUD_CLUSTER"))
31-
create.PostField("domain", d.env.Get("KOOL_DEPLOY_DOMAIN"))
32-
create.PostField("domain_extras", d.env.Get("KOOL_DEPLOY_DOMAIN_EXTRAS"))
33-
create.PostField("www_redirect", d.env.Get("KOOL_DEPLOY_WWW_REDIRECT"))
32+
_ = create.PostField("cluster", d.env.Get("KOOL_CLOUD_CLUSTER"))
33+
_ = create.PostField("domain", d.env.Get("KOOL_DEPLOY_DOMAIN"))
34+
_ = create.PostField("domain_extras", d.env.Get("KOOL_DEPLOY_DOMAIN_EXTRAS"))
35+
_ = create.PostField("www_redirect", d.env.Get("KOOL_DEPLOY_WWW_REDIRECT"))
3436

3537
resp, err = create.Run()
3638

0 commit comments

Comments
 (0)