From 19cb8fcd22e9d2bc240cbd2b23efa2e19cf7ea52 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 5 Apr 2021 11:47:03 +0300 Subject: feat: update Cargo.lock int Rust projects If we update Cargo.toml, but not Cargo.lock, and Cargo.lock is in git, when cargo publish will refuse to publish, because the files are out of sync. --- bumper.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bumper.md') diff --git a/bumper.md b/bumper.md index 43dd8c7..cebc1fb 100644 --- a/bumper.md +++ b/bumper.md @@ -91,17 +91,27 @@ project. We use a Rust project for simplicity. ~~~scenario given an installed Bumper +given file foo/src/main.rs from main.rs given file foo/Cargo.toml from Cargo.toml +given file foo/Cargo.lock from Cargo.lock given file foo/debian/changelog from changelog given all files in foo are committed to git when I run, in foo, bumper 1.2.0 then all changes in foo are committed then in foo, git tag v1.2.0 is a signed tag then file foo/Cargo.toml matches regex /version\s*=\s*"1\.2\.0"/ +then file foo/Cargo.lock is newer than foo/Cargo.toml +then file foo/Cargo.lock is committed to git then file foo/debian/changelog matches regex / \(0\.1\.0-1\) / then file foo/debian/changelog matches regex / \(1\.2\.0-1\) / ~~~ +~~~{#main.rs .file .rust} +fn main() { + println!("Hello, world!"); +} +~~~ + ~~~{#Cargo.toml .file .ini} [package] name = "foo" @@ -110,8 +120,11 @@ authors = ["J. Random Hacker "] edition = "2018" [dependencies] +anyhow = "1" ~~~ +~~~{#Cargo.lock .file .ini} +~~~ ~~~{#changelog .file} dummy (0.1.0-1) unstable; urgency=low -- cgit v1.2.1