Skip to content

Commit ad90ffd

Browse files
committed
[CI] Ensure branches are String in bumpmatrix automation
1 parent 82e25a3 commit ad90ffd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rake_tasks/automation.rake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ namespace :automation do
114114
if file == '.buildkite/pipeline.yml'
115115
require 'yaml'
116116
yaml = YAML.safe_load(content)
117-
yaml_tests_branch = yaml['steps'][0]['env']['ES_YAML_TESTS_BRANCH']
117+
yaml_tests_branch = yaml['steps'][0]['env']['ES_YAML_TESTS_BRANCH'].to_s
118118

119119
if yaml_tests_branch == 'main'
120120
old = content.match(/STACK_VERSION: (.*)/)[1]
121121
new = "STACK_VERSION: #{version}"
122122
content.gsub!(new, old)
123123
else
124-
branch = version.match(/([0-9]+\.[0-9]+)\.[0-9]+.*/)[1]
124+
branch = version.to_s.match(/([0-9]+\.[0-9]+)\.[0-9]+.*/)[1]
125125
content.gsub!(yaml_tests_branch, branch)
126126
end
127127
puts "[#{yaml_tests_branch}] -> [#{branch}] in #{file.gsub('./', '')}"

0 commit comments

Comments
 (0)