Skip to content

Commit

Permalink
RakeTasks: refactor latest_release_for
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalie committed Jul 26, 2023
1 parent a823b50 commit 48c0c26
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/travis/build/rake_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ def fetch_githubusercontent_file(from, host: 'raw.githubusercontent.com',
end

def latest_release_for(repo)
octokit.latest_release(repo)['tag_name']
logger.info "Fetching releases from #{repo}"

latest_release = octokit.latest_release(repo)['tag_name']
raise "No releases found for #{repo}" if latest_release.empty?

latest_release
rescue
raise "Could not get latest release for #{repo}"
end
Expand Down

0 comments on commit 48c0c26

Please sign in to comment.