Skip to content

Commit 5bf712c

Browse files
committed
Report: Updates url when using main branch
1 parent c5fcc97 commit 5bf712c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

report/download_artifacts.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ class << self
3131
# download the branch.
3232
#
3333
def version
34-
if ENV['BRANCH']
34+
if (branch = ENV['BRANCH'])
3535
require 'open-uri'
3636
require 'yaml'
37-
38-
versions = URI.open("https://snapshots.elastic.co/latest/#{ENV['BRANCH']}.json").read
37+
branch = 'master' if branch == 'main' # main is 404 for now
38+
versions = URI.open("https://snapshots.elastic.co/latest/#{branch}.json").read
3939
YAML.safe_load(versions)['version']
4040
else
4141
ENV['STACK_VERSION'] || read_version_from_github

0 commit comments

Comments
 (0)