Skip to content

Commit 48c0c26

Browse files
author
vitalie
committed
RakeTasks: refactor latest_release_for
1 parent a823b50 commit 48c0c26

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/travis/build/rake_tasks.rb

+6-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ def fetch_githubusercontent_file(from, host: 'raw.githubusercontent.com',
5858
end
5959

6060
def latest_release_for(repo)
61-
octokit.latest_release(repo)['tag_name']
61+
logger.info "Fetching releases from #{repo}"
62+
63+
latest_release = octokit.latest_release(repo)['tag_name']
64+
raise "No releases found for #{repo}" if latest_release.empty?
65+
66+
latest_release
6267
rescue
6368
raise "Could not get latest release for #{repo}"
6469
end

0 commit comments

Comments
 (0)