From 979d03aa682484050895626afca246f2613eb900 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 23 Jan 2019 15:04:51 +0800 Subject: [PATCH] Remove s3 bucket check in `migrate_to_s3` task. Bucket creation is expected to be handled by the user. If the bucket does not exist, the script will fail anyway. --- lib/tasks/uploads.rake | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/tasks/uploads.rake b/lib/tasks/uploads.rake index 852075c5482..05105f5c9b5 100644 --- a/lib/tasks/uploads.rake +++ b/lib/tasks/uploads.rake @@ -258,13 +258,6 @@ def migrate_to_s3 bucket, folder = ENV["DISCOURSE_S3_BUCKET"], "" end - begin - s3.head_bucket(bucket: bucket) - rescue Aws::S3::Errors::NotFound - puts "Bucket '#{bucket}' not found. Creating it..." - s3.create_bucket(bucket: bucket) unless dry_run - end - puts "Uploading files to S3..." print " - Listing local files"