summaryrefslogtreecommitdiff
path: root/bumper.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-02-14 12:33:34 +0200
committerLars Wirzenius <liw@liw.fi>2016-02-14 12:35:07 +0200
commitbd62b20bea61e82bce57d15f32bc8a98ece7cca2 (patch)
treee3b4dde3e6afe27e8a9dbf44a8c72b5f271dd6c1 /bumper.yarn
parentf36ae7218b9850fa4ed37c32f3879e99782cc1f0 (diff)
downloadbumper-bd62b20bea61e82bce57d15f32bc8a98ece7cca2.tar.gz
Update debian/changelog
Diffstat (limited to 'bumper.yarn')
-rw-r--r--bumper.yarn21
1 files changed, 21 insertions, 0 deletions
diff --git a/bumper.yarn b/bumper.yarn
index 365870f..f60b4f6 100644
--- a/bumper.yarn
+++ b/bumper.yarn
@@ -55,6 +55,7 @@ also stored.
GIVEN Python project foo, version controlled by git
AND a file foolib/version.py in foo containing
... "__version__ = '0.0'\n__version_info__ = (0, 0)\n"
+ AND project foo has Debian packaging
We run Bumper, and it does several things.
@@ -64,6 +65,7 @@ We run Bumper, and it does several things.
... "__version__ = "3.2"\n__version_info__ = (3, 2)\n"
AND file foolib/version.py in foo contains
... "__version__ = "3.2"\n__version_info__ = (3, 2)\n"
+ AND in foo, tag foo-3.2, has Debian version 3.2-1
# Appendix: Scenario step implementations
@@ -109,6 +111,15 @@ for Bumper.
['git', 'commit', '-m', 'Add {}'.format(filename)],
cwd=dirname)
+ IMPLEMENTS GIVEN project (\S+) has Debian packaging
+ import os, cliapp, yarnstep
+ project = yarnstep.get_next_match()
+ dirname = yarnstep.datadir(project)
+ os.mkdir(os.path.join(dirname, 'debian'))
+ cliapp.runcmd(
+ ['dch', '--create', '-v', '0.0-1', '--package', project, ''],
+ cwd=dirname)
+
IMPLEMENTS WHEN user runs "bumper (\S+) (\S+)" in the (\S+) directory
import cliapp, yarnstep
version = yarnstep.get_next_match()
@@ -138,6 +149,16 @@ for Bumper.
cwd=dirname)
assert wanted_data == actual_data
+ IMPLEMENTS THEN in (\S+), tag (\S+), has Debian version (\S+)
+ import os, yarnstep
+ dirname = yarnstep.get_next_match_as_datadir_path()
+ tagname = yarnstep.get_next_match()
+ version = yarnstep.get_next_match()
+ text = yarnstep.cat(os.path.join(dirname, 'debian/changelog'))
+ line1, _ = text.split('\n', 1)
+ assert '({})'.format(version) in line1
+ assert line1.split()[2] != 'UNRELEASED;'
+
IMPLEMENTS THEN git repository (\S+) has tag (\S+), signed with (\S+)
import subprocess, cliapp, yarnstep
dirname = yarnstep.get_next_match_as_datadir_path()