fix: skip rebuild during clone/rename if there is no code

This commit is contained in:
Jose Diaz-Gonzalez committed 2022-04-16 01:40:22 -04:00
1 parent 1b6861cdbb
commit eec49878a5
1 file changed
+8
+8
View File
@@ -48,6 +48,10 @@ func CommandClone(oldAppName string, newAppName string, skipDeploy bool, ignoreE
os.Setenv("SKIP_REBUILD", "true") os.Setenv("SKIP_REBUILD", "true")
} }
if err := common.PlugnTrigger("git-has-code", []string{newAppName}...); err != nil {
os.Setenv("SKIP_REBUILD", "true")
}
if err := common.PlugnTrigger("post-app-clone", []string{oldAppName, newAppName}...); err != nil { if err := common.PlugnTrigger("post-app-clone", []string{oldAppName, newAppName}...); err != nil {
return err return err
} }
@@ -167,6 +171,10 @@ func CommandRename(oldAppName string, newAppName string, skipDeploy bool) error
os.Setenv("SKIP_REBUILD", "true") os.Setenv("SKIP_REBUILD", "true")
} }
if err := common.PlugnTrigger("git-has-code", []string{newAppName}...); err != nil {
os.Setenv("SKIP_REBUILD", "true")
}
if err := common.PlugnTrigger("post-app-rename", []string{oldAppName, newAppName}...); err != nil { if err := common.PlugnTrigger("post-app-rename", []string{oldAppName, newAppName}...); err != nil {
return err return err
} }