From 085254809995b0ea01703ceab2383ea32a0a237b Mon Sep 17 00:00:00 2001 From: Lee Brown Date: Thu, 22 Aug 2019 23:15:47 -0800 Subject: [PATCH] print remote username --- build/cicd/internal/config/config.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build/cicd/internal/config/config.go b/build/cicd/internal/config/config.go index 169d64e..15ea446 100644 --- a/build/cicd/internal/config/config.go +++ b/build/cicd/internal/config/config.go @@ -117,10 +117,18 @@ 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) + + log.Println("cfg.ProjectName ", cfg.ProjectName ) + log.Println("remoteUser ", remoteUser ) + // Its a true fork from the origin repo. - if gitRemoteUser( modDetails.ProjectRoot) != "geeks-accelerator" { + if remoteUser != "geeks-accelerator" && remoteUser != "oss" { // 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 ) } }