From eec49878a5cf0d686a90e8655b2e297463c05c25 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 3 Apr 2022 15:05:43 -0400 Subject: [PATCH] fix: skip rebuild during clone/rename if there is no code --- plugins/apps/subcommands.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/apps/subcommands.go b/plugins/apps/subcommands.go index bac59eb94..d8eef9ba2 100644 --- a/plugins/apps/subcommands.go +++ b/plugins/apps/subcommands.go @@ -48,6 +48,10 @@ func CommandClone(oldAppName string, newAppName string, skipDeploy bool, ignoreE 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 { return err } @@ -167,6 +171,10 @@ func CommandRename(oldAppName string, newAppName string, skipDeploy bool) error 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 { return err }