Open source AI coding agent. Designed for large projects and real world tasks.
Go aiai-agentsai-developer-toolsai-toolsclicommand-linedeveloper-toolsgitgolanggpt-4llmopenaipolyglot-programmingterminalterminal-basedterminal-ui
[44;97;1m π€ Plandex [0;0;22m π Fixed the issue with AWS CLI command syntax in deploy.sh βοΈ Edits: β’ infra/deploy.sh β Fix AWS CLI task definition registration command
Dane Schneideraf265bd81fbf
diff --git a/infra/deploy.sh b/infra/deploy.shindex e709c476..64105883 100755--- a/infra/deploy.sh+++ b/infra/deploy.sh@@ -137,11 +137,14 @@ update_ecs_service() {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)) | split("/")[1]')+log "CLUSTER_NAME: $CLUSTER_NAME"log "SERVICE_NAME: $SERVICE_NAME"+ log "TASK_DEF_NAME: $TASK_DEF_NAME"# Retrieve the current task definition for the ECS service- TASK_DEF=$(aws ecs describe-task-definition --task-definition "plandex-task-definition-$STACK_TAG")+ TASK_DEF=$(aws ecs describe-task-definition --task-definition "$TASK_DEF_NAME")# Extract the current task definition JSON without the revisionTASK_DEF_JSON=$(echo $TASK_DEF | jq '.taskDefinition | del(.revision) | del(.status) | del(.taskDefinitionArn) | del(.requiresAttributes) | del(.compatibilities)')@@ -149,7 +152,7 @@ update_ecs_service() {UPDATED_TASK_DEF_JSON=$(echo $TASK_DEF_JSON | jq --arg IMAGE_URI "$ECR_REPOSITORY:$IMAGE_TAG" '.containerDefinitions[0].image = $IMAGE_URI')# Register the new task definition revision with the updated image- REGISTERED_TASK_DEF=$(echo $UPDATED_TASK_DEF_JSON | aws ecs register-task-definition --cli-input-json file://-)+ REGISTERED_TASK_DEF=$(echo $UPDATED_TASK_DEF_JSON | aws ecs register-task-definition --cli-input-json /dev/stdin)NEW_TASK_DEF_ARN=$(echo $REGISTERED_TASK_DEF | jq -r '.taskDefinition.taskDefinitionArn')log "New task definition registered: $NEW_TASK_DEF_ARN"