diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-04-13 08:39:17 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-04-13 08:39:17 +0000 |
commit | 50258196ee8832ca8d9f02e73babb431248ed025 (patch) | |
tree | 3b39dba244bd13a39abaca5b22d4574983323f3c /bumper.md | |
parent | a7cbaaa9be2dfc5e4fcdaf342dba98c923a99ab4 (diff) | |
parent | 297521aab3d48f12b09d1b3071c1e13ed7cafdb4 (diff) | |
download | bumper-rs-50258196ee8832ca8d9f02e73babb431248ed025.tar.gz |
Merge branch 'python' into 'main'
Python support
Closes #2
See merge request larswirzenius/bumper!17
Diffstat (limited to 'bumper.md')
-rw-r--r-- | bumper.md | 54 |
1 files changed, 40 insertions, 14 deletions
@@ -41,6 +41,10 @@ tree, to keep things simple. package's version number. Bumper assumes the file is otherwise up to date for the release, and sets the version to `X.Y.Z-1`. +* Python projects have a `setup.py` file at the root of the source + tree, and at least one `version.py` in a sub-directory where the + version number is stored in the `__version__` variable. + * Releases are marked with signed, annotated git tags named after the release version with a `v` prefix. @@ -74,18 +78,16 @@ Some random text file Bumper knows nothing about. ~~~ -## Creates a release tag +## Sets version for Rust project -This scenario verifies that Bumper creates a git tag to mark a -release. For this to work, Bumper needs to recognize the type of -project. We use a Rust project for simplicity. +This scenario verifies that Bumper creates a git tag to mark a release +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 @@ -93,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} @@ -114,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 @@ -124,6 +135,21 @@ dummy (0.1.0-1) unstable; urgency=low -- Lars Wirzenius <liw@liw.fi> Tue, 30 Mar 2021 08:33:35 +0300 ~~~ +## Sets version for Python project + +This scenario verifies that Bumper creates a git tag to mark a +release for a Python project. + +~~~scenario +given an installed Bumper +given file foo/setup.py from empty +given file foo/lib/version.py 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 +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"/ +~~~ --- |