Skip to content

Commit

Permalink
Replace failing grep with builtin query
Browse files Browse the repository at this point in the history
Fixes: aws/aws-sam-cli#5940
Script was failing for MacOS's default grep command
  • Loading branch information
cibinmathew committed Oct 21, 2023
1 parent fa5ce2c commit 9db33f5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ npm run build && cd dist/
aws s3 sync . s3://$s3_bucket_name/

# Create cloudfront invalidation and capture id for next step
invalidation_output=$(aws cloudfront create-invalidation --distribution-id $cloudfront_distribution_id --paths "/*")
invalidation_output=$(aws cloudfront create-invalidation --distribution-id $cloudfront_distribution_id --paths "/*" --query "Invalidation.Id" --output text)
invalidation_id=$(echo "$invalidation_output" | grep -oP '(?<="Id": ")[^"]+')

# Wait for cloudfront invalidation to complete
Expand Down

0 comments on commit 9db33f5

Please sign in to comment.