Skip to content

Commit

Permalink
fix(cargo): set default rangeStrategy to 'bump' (#4751)
Browse files Browse the repository at this point in the history
It fixes unexpected "downgrading" behavior when updating normal
  versions like `0.9.21`, which are treated as caret ranges by cargo.

  For example if rangeStrategy is 'replace', an update like
  `0.9.21` -> `0.9.22` will result in newValue = `0.9.0`, because
  "caret range" `0.9.0` contains both `=0.9.21` and `=0.9.22`
  • Loading branch information
nchashch authored and rarkins committed Oct 31, 2019
1 parent d50285c commit f2534bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/config/definitions.ts
Expand Up @@ -1469,6 +1469,7 @@ const options: RenovateOptions[] = [
managerBranchPrefix: 'rust-',
fileMatch: ['(^|/)Cargo.toml$'],
versionScheme: 'cargo',
rangeStrategy: 'bump',
},
mergeable: true,
},
Expand Down
3 changes: 2 additions & 1 deletion renovate-schema.json
Expand Up @@ -948,7 +948,8 @@
"commitMessageTopic": "Rust crate {{depName}}",
"managerBranchPrefix": "rust-",
"fileMatch": ["(^|/)Cargo.toml$"],
"versionScheme": "cargo"
"versionScheme": "cargo",
"rangeStrategy": "bump"
},
"$ref": "#"
},
Expand Down

0 comments on commit f2534bc

Please sign in to comment.