summaryrefslogtreecommitdiff
path: root/bumper.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-02-14 12:49:29 +0200
committerLars Wirzenius <liw@liw.fi>2016-02-14 12:49:29 +0200
commit73eb0c175d40bb7273f45a025e1278fcda552772 (patch)
tree6a0c7bb40b10951103068a70c7d04add1c45ad37 /bumper.yarn
parent4e6d3f18173e53be7c95b8f18c6f9f406badc077 (diff)
downloadbumper-73eb0c175d40bb7273f45a025e1278fcda552772.tar.gz
Update NEWS for new release
Diffstat (limited to 'bumper.yarn')
-rw-r--r--bumper.yarn20
1 files changed, 20 insertions, 0 deletions
diff --git a/bumper.yarn b/bumper.yarn
index 8f2e3b0..99c7e19 100644
--- a/bumper.yarn
+++ b/bumper.yarn
@@ -63,6 +63,8 @@ We run Bumper, and it does several things.
THEN git repository foo has tag foo-3.2, signed with AA8CD13C
AND in foo, tag foo-3.2, foolib/version.py contains
... "__version__ = "3.2"\n__version_info__ = (3, 2)\n"
+ AND in foo, tag foo-3.2, NEWS matches
+ ... "^Version 3.2, released \\d\\d\\d\\d-\\d\\d-\\d\\d$"
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
@@ -96,6 +98,12 @@ for Bumper.
from distutils.core import setup
setup(name='{project}')
'''.format(project=project))
+ yarnstep.write_file(os.path.join(dirname, 'NEWS'), '''
+ NEWS for {project}
+ ==================
+ Version 0.0, not yet released
+ -----------------------------
+ '''.format(project=project))
cliapp.runcmd(['git', 'init', dirname])
cliapp.runcmd(['git', 'add', '.'], cwd=dirname)
cliapp.runcmd(['git', 'commit', '-mInitial'], cwd=dirname)
@@ -151,6 +159,18 @@ for Bumper.
cwd=dirname)
assert wanted_data == actual_data
+ IMPLEMENTS THEN in (\S+), tag (\S+), (\S+) matches "(.*)"
+ import re, cliapp, yarnstep
+ dirname = yarnstep.get_next_match_as_datadir_path()
+ tag = yarnstep.get_next_match()
+ filename = yarnstep.get_next_match()
+ wanted_data_escaped = yarnstep.get_next_match()
+ wanted_data = yarnstep.unescape_backslashes(wanted_data_escaped)
+ actual_data = cliapp.runcmd(
+ ['git', 'cat-file', 'blob', '{}:{}'.format(tag, filename)],
+ cwd=dirname)
+ assert re.search(wanted_data, actual_data, flags=re.M)
+
IMPLEMENTS THEN in (\S+), tag (\S+), has Debian version (\S+)
import os, yarnstep
dirname = yarnstep.get_next_match_as_datadir_path()