We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5fcc97 commit 5bf712cCopy full SHA for 5bf712c
report/download_artifacts.rb
@@ -31,11 +31,11 @@ class << self
31
# download the branch.
32
#
33
def version
34
- if ENV['BRANCH']
+ if (branch = ENV['BRANCH'])
35
require 'open-uri'
36
require 'yaml'
37
-
38
- versions = URI.open("https://snapshots.elastic.co/latest/#{ENV['BRANCH']}.json").read
+ branch = 'master' if branch == 'main' # main is 404 for now
+ versions = URI.open("https://snapshots.elastic.co/latest/#{branch}.json").read
39
YAML.safe_load(versions)['version']
40
else
41
ENV['STACK_VERSION'] || read_version_from_github
0 commit comments