From 297521aab3d48f12b09d1b3071c1e13ed7cafdb4 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 13 Apr 2021 11:37:09 +0300 Subject: refactor: split scenario for Rust+Debian to separate scenarios --- bumper.md | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/bumper.md b/bumper.md index 67979ab..1082997 100644 --- a/bumper.md +++ b/bumper.md @@ -85,10 +85,9 @@ for a Rust project. ~~~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 file foo/Cargo.lock from empty +given file foo/src/main.rs from empty given all files in foo are committed to git when I run, in foo, bumper 105.12765.42 then all changes in foo are committed @@ -96,14 +95,9 @@ then in foo, git tag v105.12765.42 is a signed tag then file foo/Cargo.toml matches regex /version\s*=\s*"105\.12765\.42"/ 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 / \(105\.12765\.42-1\) / ~~~ -~~~{#main.rs .file .rust} -fn main() { - println!("Hello, world!"); -} +~~~{#empty .file} ~~~ ~~~{#Cargo.toml .file .ini} @@ -117,8 +111,22 @@ edition = "2018" anyhow = "1" ~~~ -~~~{#Cargo.lock .file .ini} +## Sets version for project with Debian packaging + +This scenario verifies that Bumper creates a git tag to mark a release +for a project with Debian packaging. + +~~~scenario +given an installed Bumper +given file foo/debian/changelog from changelog +given all files in foo are committed to git +when I run, in foo, bumper 105.12765.42 +then all changes in foo are committed +then in foo, git tag v105.12765.42 is a signed tag +then file foo/debian/changelog matches regex / \(0\.1\.0-1\) / +then file foo/debian/changelog matches regex / \(105\.12765\.42-1\) / ~~~ + ~~~{#changelog .file} dummy (0.1.0-1) unstable; urgency=low @@ -143,10 +151,6 @@ then in foo, git tag v105.12765.42 is a signed tag then file foo/lib/version.py matches regex /__version__\s*=\s*"105\.12765\.42"/ ~~~ -~~~{#empty .file} -~~~ - - --- title: bumper – set version number for a project -- cgit v1.2.1