File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -107,11 +107,16 @@ namespace :automation do
107
107
if file == '.buildkite/pipeline.yml'
108
108
require 'yaml'
109
109
yaml = YAML . safe_load ( content )
110
- branch = version . match ( /([0-9]+\. [0-9]+)\. [0-9]+.*/ ) [ 1 ]
111
110
yaml_tests_branch = yaml [ 'steps' ] [ 0 ] [ 'env' ] [ 'ES_YAML_TESTS_BRANCH' ]
112
- next if yaml_tests_branch == 'main'
113
111
114
- content . gsub! ( yaml_tests_branch , branch )
112
+ if yaml_tests_branch == 'main'
113
+ old = content . match ( /STACK_VERSION: (.*)/ ) [ 1 ]
114
+ new = "STACK_VERSION: #{ version } "
115
+ content . gsub! ( new , old )
116
+ else
117
+ branch = version . match ( /([0-9]+\. [0-9]+)\. [0-9]+.*/ ) [ 1 ]
118
+ content . gsub! ( yaml_tests_branch , branch )
119
+ end
115
120
puts "[#{ yaml_tests_branch } ] -> [#{ branch } ] in #{ file . gsub ( './' , '' ) } "
116
121
end
117
122
match = content . match ( regexp )
You can’t perform that action at this time.
0 commit comments