Skip to content

Commit e23ffca

Browse files
authored
Merge pull request #464 from kool-dev/kool_deploy_tweaks
Kool Cloud Tweak
2 parents 3b5acab + 18f05d0 commit e23ffca

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

commands/cloud_deploy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818

1919
const (
2020
koolDeployEnv = "kool.deploy.env"
21-
koolDeployFile = "kool.deploy.yml"
21+
koolDeployFile = "kool.cloud.yml"
2222
)
2323

2424
// KoolDeploy holds handlers and functions for using Deploy API

services/cloud/deploy_validator.go

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,15 @@ func ValidateKoolDeployFile(workingDir string, koolDeployFile string) (err error
3838
path = filepath.Join(workingDir, koolDeployFile)
3939

4040
if _, err = os.Stat(path); os.IsNotExist(err) {
41-
err = fmt.Errorf("could not find required file (%s) on current working directory", koolDeployFile)
41+
// temporary failback to old file name
42+
path = filepath.Join(workingDir, "kool.deploy.yml")
43+
44+
if _, err = os.Stat(path); os.IsNotExist(err) {
45+
err = fmt.Errorf("could not find required file (%s) on current working directory", "kool.cloud.yml")
46+
return
47+
} else if err != nil {
48+
return
49+
}
4250
return
4351
} else if err != nil {
4452
return
@@ -52,7 +60,6 @@ func ValidateKoolDeployFile(workingDir string, koolDeployFile string) (err error
5260
return
5361
}
5462

55-
var gotPublicService = false
5663
for service, config := range deployConfig.Services {
5764
// validates build file exists if defined
5865
if config.Build != nil {
@@ -67,15 +74,6 @@ func ValidateKoolDeployFile(workingDir string, koolDeployFile string) (err error
6774

6875
// validates only one service can be public, and it must define a port
6976
if config.Public != nil {
70-
// this is a public service
71-
if gotPublicService {
72-
// we can have only the one!
73-
err = fmt.Errorf("service (%s) is public, but another service is already public", service)
74-
return
75-
}
76-
77-
gotPublicService = true
78-
7977
// being public, it must define the `port` entry as well
8078
if config.Port == nil {
8179
err = fmt.Errorf("service (%s) is public, but it does not define the `port` entry", service)

0 commit comments

Comments
 (0)