Regex for the "Cookbook Version" task will accidentally replace chef_version if present in metadata.rb. Can be fixed by prepending ^ to the regex so it only matches strings starting with "version" instead of anything containing version.
|
replace({ |
|
regex: /version\s+['"].*['"]/, |
|
replacement: sprintf("version '%s'", params["chefCookbookVersion"]), |
|
paths: [params["chefCookbookMetadata"]] |
|
}); |
chef_version described here
Regex for the "Cookbook Version" task will accidentally replace
chef_versionif present in metadata.rb. Can be fixed by prepending^to the regex so it only matches strings starting with "version" instead of anything containing version.azuredevops-chef/tasks/cookbook_version/cookbook_version.ts
Lines 18 to 22 in 2dfffa7
chef_versiondescribed here