1
0
mirror of https://github.com/raseels-repos/golang-saas-starter-kit.git synced 2025-08-08 22:36:41 +02:00

update devops package

This commit is contained in:
Lee Brown
2019-08-23 11:17:10 -08:00
parent e8bf11c9d9
commit f2c5b7211f
4 changed files with 12 additions and 11 deletions

View File

@ -117,15 +117,14 @@ func (cfgCtx *ConfigContext) Config(log *log.Logger) (*devdeploy.Config, error)
// their name is calculated with the go.mod path. Since the name-scope of AWS resources is region/global scope,
// it will fail to create appropriate resources for the account of the forked user.
if cfg.ProjectName == "saas-starter-kit" {
remoteUser := gitRemoteUser( modDetails.ProjectRoot)
remoteUser := gitRemoteUser(modDetails.ProjectRoot)
// Its a true fork from the origin repo.
if remoteUser != "saas-starter-kit" && remoteUser != "geeks-accelerator" {
if remoteUser != "saas-starter-kit" && remoteUser != "geeks-accelerator" {
// Replace the prefix 'saas' with the parent directory name, hopefully the gitlab group/username.
cfg.ProjectName = filepath.Base(filepath.Dir(cfg.ProjectRoot)) + "-starter-kit"
log.Println("switching project name to ", cfg.ProjectName )
log.Println("switching project name to ", cfg.ProjectName)
}
}
@ -612,6 +611,6 @@ func gitRemoteUser(projectRoot string) string {
}
remoteUser := strings.Split(remoteUrl, "/")[0]
return remoteUser
}