Skip to content

Open source AI coding agent. Designed for large projects and real world tasks.

 πŸ€– Plandex  πŸ“ Fix extraction of SERVICE_NAME in deploy.sh script ✏️ Edits: β€’ infra/deploy.sh βœ… Correct extraction of SERVICE_NAME from ARN

Dane Schneider6c20d5672434
diff --git a/infra/deploy.sh b/infra/deploy.sh
index ce0e8b81..7ffb0de7 100755
--- a/infra/deploy.sh
+++ b/infra/deploy.sh
@@ -137,8 +137,8 @@ update_ecs_service() {
log "STACK_TAG: $STACK_TAG"
# Use the extracted tag to find the ECS cluster and service names
- CLUSTER_NAME=$(aws ecs list-clusters | jq -r --arg TAG "$STACK_TAG" '.clusterArns[] | select(contains("plandex-stack-" + $TAG)) | split("/")[1]')
- SERVICE_NAME=$(aws ecs list-services --cluster "$CLUSTER_NAME" | jq -r --arg TAG "$STACK_TAG" '.serviceArns[] | select(contains("plandex-stack-" + $TAG)) | split("/")[1]')
+ CLUSTER_NAME=$(aws ecs list-clusters | jq -r --arg TAG "$STACK_TAG" '.clusterArns[] | select(contains("plandex-stack-" + $TAG)) | split("/") | .[-1]')
+ SERVICE_NAME=$(aws ecs list-services --cluster "$CLUSTER_NAME" | jq -r --arg TAG "$STACK_TAG" '.serviceArns[] | select(contains("plandex-stack-" + $TAG)) | split("/") | .[-1]')
TASK_DEF_NAME=$(aws ecs list-task-definitions | jq -r --arg TAG "$STACK_TAG" '.taskDefinitionArns[] | select(contains("plandexstack" + $TAG))' | sort -V | tail -n 1 | awk -F'/' '{print $2}')