Update the bump-version script (#609)

Remove deprecated `--string` of `str replace`
Use `version = ""` for config as well as folks want to have the same
experience in `rg`
This commit is contained in:
Stefan Holderbach 2023-09-19 12:55:53 +02:00 committed by GitHub
parent 56d948e787
commit 30b06ccc3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,14 +25,14 @@ def main [
ls **/Cargo.toml | each {|file|
log debug $"bumping ($file.name) from ($version) to ($new_version)"
open --raw $file.name
| str replace --all --string $'version = "($version)"' $'version = "($new_version)"'
| str replace --all $'version = "($version)"' $'version = "($new_version)"'
| save --force $file.name
}
"crates/nu-utils/src/sample_config/default_{config,env}.nu" | str expand | each {|file|
log debug $"bumping ($file) from ($version) to ($new_version)"
open --raw $file
| str replace --all --string $'version = ($version)' $'version = ($new_version)'
| str replace --all $'version = "($version)"' $'version = "($new_version)"'
| save --force $file
}