From 576942482cb4c9328eaf13d7cfd8afc5d68b8f84 Mon Sep 17 00:00:00 2001
From: Johan de Klerk <jdeklerk00@gmail.com>
Date: Fri, 8 Oct 2021 11:34:29 +0200
Subject: [PATCH] Only do hotswap on dev

---
 mage_helpers/cdk.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/mage_helpers/cdk.go b/mage_helpers/cdk.go
index 68881b6..c99fb7a 100644
--- a/mage_helpers/cdk.go
+++ b/mage_helpers/cdk.go
@@ -78,7 +78,10 @@ func CDKDeploy(cdkDir string, env string, stack string, exclusively bool, local
 
 	if local {
 		commandArgs = append(commandArgs, fmt.Sprintf(`--profile=%v`, profile))
-		commandArgs = append(commandArgs, `--hotswap`) // make it go fast
+
+		if env == "dev" {
+			commandArgs = append(commandArgs, `--hotswap`) // make it go fast
+		}
 	}
 
 	commandArgs = append(commandArgs,
-- 
GitLab