Skip to content

Commit

Permalink
add a Nushell version update script and bump all versions to 0.81.0 (
Browse files Browse the repository at this point in the history
…#21)

* add a little script to update the Nushell version at once

* EXAMPLE: downgrade to 0.80.0

Command run:
```nu
./scripts/update-nushell-version 0.80.0
```

* update the version of Nushell to `0.81.0`

Command run:
```nu
./scripts/update-nushell-version 0.81.0
```

Sample output:
```nu
2023-06-08T19:56:25.197|INF|updating the badge in the README
2023-06-08T19:56:25.202|INF|updating the `nu-parser` dependency
    Updating crates.io index
      Adding nu-parser v0.81.0 to dependencies.
             Features:
             - nu-plugin
             - plugin
2023-06-08T19:56:26.312|INF|updating the `nu-protocol` dependency
    Updating crates.io index
      Adding nu-protocol v0.81.0 to dependencies.
             Features:
             - plugin
             - serde_json
2023-06-08T19:56:26.815|WRN|do not forget to commit and push this :wink:
```
  • Loading branch information
amtoine committed Jun 9, 2023
1 parent 763c677 commit 1b952cc
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 21 deletions.
33 changes: 14 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ anyhow = "1.0.71"
clap = { version = "4.3.0", optional = true, features = ["unicode", "derive"] }
env_logger = "0.10.0"
log = "0.4.17"
nu-parser = "0.80.0"
nu-protocol = "0.80.0"
nu-parser = "0.81.0"
nu-protocol = "0.81.0"

[dev-dependencies]
criterion = "0.5.1"
Expand Down
19 changes: 19 additions & 0 deletions scripts/update-nushell-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env nu

use std log

def main [
version: string # the new version of Nushell, e.g. 0.82.0
] {
log info "updating the badge in the README"
open README.md
| str replace 'https://img.shields.io/badge/nushell-v\d+\.\d+\.\d+-green' $"https://img.shields.io/badge/nushell-v($version)-green"
| save --force README.md

log info "updating the `nu-parser` dependency"
cargo add $"nu-parser@($version)"
log info "updating the `nu-protocol` dependency"
cargo add $"nu-protocol@($version)"

log warning "do not forget to commit and push this :wink:"
}

0 comments on commit 1b952cc

Please sign in to comment.