File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ namespace :automation do
107
107
require 'yaml'
108
108
yaml = YAML . safe_load ( content )
109
109
branch = version . match ( /([0-9]+\. [0-9]+)\. [0-9]+.*/ ) [ 1 ]
110
- yaml_tests_branch = yaml [ 'steps' ] [ 1 ] [ 'env' ] [ 'ES_YAML_TESTS_BRANCH' ]
110
+ yaml_tests_branch = yaml [ 'steps' ] [ 0 ] [ 'env' ] [ 'ES_YAML_TESTS_BRANCH' ]
111
111
next if yaml_tests_branch == 'main'
112
112
113
113
content . gsub! ( yaml_tests_branch , branch )
@@ -117,6 +117,8 @@ namespace :automation do
117
117
next if match . nil?
118
118
119
119
old_version = match [ 1 ]
120
+ next if old_version == args [ :version ]
121
+
120
122
content . gsub! ( old_version , args [ :version ] )
121
123
puts "[#{ old_version } ] -> [#{ version } ] in #{ file . gsub ( './' , '' ) } "
122
124
File . open ( file , 'w' ) { |f | f . puts content }
You can’t perform that action at this time.
0 commit comments