Skip to content

Commit

Permalink
Use toml-cli for updating Cargo.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamc committed Jan 16, 2025
1 parent 6531986 commit 51a5327
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
check.check-semver
check.check-clippy
editorconfig-checker
toml-cli
]
++ lib.optionals (pkgs.stdenv.isLinux) (with pkgs; [
checkpolicy
Expand Down
3 changes: 2 additions & 1 deletion prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ cargo update --aggressive
git add Cargo.lock
git commit -m "Update Cargo.lock prior to v$version"

sed -i '/^version = ".*"$/s/^.*/version = "'"$version"'"/' Cargo.toml
toml set ./Cargo.toml package.version "$version" > Cargo.toml.next
mv Cargo.toml.next Cargo.toml
git add Cargo.toml

cargo fetch
Expand Down

0 comments on commit 51a5327

Please sign in to comment.