Skip to content

Commit

Permalink
Revert "Revert "Support S3 mirroring of release assets from private r…
Browse files Browse the repository at this point in the history
…epos""

This reverts commit d485e16.
  • Loading branch information
amdprophet committed Nov 17, 2023
1 parent d485e16 commit ced0893
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/interactors/persist_assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ def call
context.fail!(error: "#{version.version} has no config") if version.config.blank?
context.fail!(error: "#{version.version} has no builds in config") if version.config['builds'].blank?

github_asset_data_hashes = gather_github_release_asset_data_hashes(version)

version.config['builds'].each do |build|

if build['asset_url'].blank?
Expand All @@ -24,7 +26,10 @@ def call

begin
#puts "******** URI #{release_asset.source_asset_url}"
url = URI(release_asset.source_asset_url)
github_asset_data_hash = github_asset_data_hashes.
find { |h| h[:browser_download_url] == build['asset_url'] }.
to_h
url = URI(github_asset_data_hash[:url])
rescue URI::Error => error
puts "******** URI error: #{release_asset.source_asset_url} - #{error.message}"
next
Expand Down

0 comments on commit ced0893

Please sign in to comment.