Skip to content

Commit 0423246

Browse files
committed
Report: Updates version and url for using main branch
1 parent c5fcc97 commit 0423246

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

report/download_artifacts.rb

+6-4
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,16 @@ class << self
3131
# download the branch.
3232
#
3333
def version
34-
if ENV['BRANCH']
34+
if ENV['STACK_VERSION']
35+
ENV['STACK_VERSION']
36+
elsif (branch = ENV['BRANCH'])
3537
require 'open-uri'
3638
require 'yaml'
37-
38-
versions = URI.open("https://snapshots.elastic.co/latest/#{ENV['BRANCH']}.json").read
39+
branch = 'master' if branch == 'main' # main is 404 for now
40+
versions = URI.open("https://snapshots.elastic.co/latest/#{branch}.json").read
3941
YAML.safe_load(versions)['version']
4042
else
41-
ENV['STACK_VERSION'] || read_version_from_github
43+
read_version_from_github
4244
end
4345
end
4446

0 commit comments

Comments
 (0)