diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-01-21 21:28:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-21 21:28:13 +0100 |
commit | 368d6fe54f94ad2ecd2a1c1e7e5a2359dc37ad30 (patch) | |
tree | 716c7c9a4e7f5717e982de3c67a462aa75d3aae4 /lib | |
parent | c4a5e0ca0e89b2f8abd69ed9b8a4da3f82d0ccaf (diff) | |
parent | 3c76f1f6c2a95e80a02419b83478b89714a9d430 (diff) |
Merge pull request #2092 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mastodon/version.rb | 6 | ||||
-rw-r--r-- | lib/tasks/mastodon.rake | 38 |
2 files changed, 40 insertions, 4 deletions
diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 6b423f6fc..24aa380aa 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -9,15 +9,15 @@ module Mastodon end def minor - 0 + 1 end def patch - 2 + 0 end def flags - '' + 'rc1' end def suffix diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index 32040feec..876383d7f 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -142,7 +142,7 @@ namespace :mastodon do prompt.say "\n" if prompt.yes?('Do you want to store uploaded files on the cloud?', default: false) - case prompt.select('Provider', ['DigitalOcean Spaces', 'Amazon S3', 'Wasabi', 'Minio', 'Google Cloud Storage']) + case prompt.select('Provider', ['DigitalOcean Spaces', 'Amazon S3', 'Wasabi', 'Minio', 'Google Cloud Storage', 'Storj DCS']) when 'DigitalOcean Spaces' env['S3_ENABLED'] = 'true' env['S3_PROTOCOL'] = 'https' @@ -257,6 +257,42 @@ namespace :mastodon do q.required true q.modify :strip end + when 'Storj DCS' + env['S3_ENABLED'] = 'true' + env['S3_PROTOCOL'] = 'https' + env['S3_REGION'] = 'global' + + env['S3_ENDPOINT'] = prompt.ask('Storj DCS endpoint URL:') do |q| + q.required true + q.default "https://gateway.storjshare.io" + q.modify :strip + end + + env['S3_PROTOCOL'] = env['S3_ENDPOINT'].start_with?('https') ? 'https' : 'http' + env['S3_HOSTNAME'] = env['S3_ENDPOINT'].gsub(/\Ahttps?:\/\//, '') + + env['S3_BUCKET'] = prompt.ask('Storj DCS bucket name:') do |q| + q.required true + q.default "files.#{env['LOCAL_DOMAIN']}" + q.modify :strip + end + + env['AWS_ACCESS_KEY_ID'] = prompt.ask('Storj Gateway access key (uplink share --register --readonly=false --not-after=none sj://bucket):') do |q| + q.required true + q.modify :strip + end + + env['AWS_SECRET_ACCESS_KEY'] = prompt.ask('Storj Gateway secret key:') do |q| + q.required true + q.modify :strip + end + + linksharing_access_key = prompt.ask('Storj Linksharing access key (uplink share --register --public --readonly=true --disallow-lists --not-after=none sj://bucket):') do |q| + q.required true + q.modify :strip + end + env['S3_ALIAS_HOST'] = "link.storjshare.io/raw/#{linksharing_access_key}/#{env['S3_BUCKET']}" + when 'Google Cloud Storage' env['S3_ENABLED'] = 'true' env['S3_PROTOCOL'] = 'https' |