From 1baff9d57b82cab7cca5401767b52f41e877ccaa Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Thu, 11 Feb 2016 21:31:52 -0800 Subject: [PATCH] cutarelease: tigher "$version" commit message for release ver; add date to release tag --- tools/cutarelease.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/cutarelease.py b/tools/cutarelease.py index 2cfeb98..74f1a74 100755 --- a/tools/cutarelease.py +++ b/tools/cutarelease.py @@ -26,6 +26,7 @@ import codecs import logging import optparse import json +import time @@ -152,14 +153,15 @@ def cutarelease(project_name, version_files, dry_run=False): f = codecs.open(changes_path, 'w', 'utf-8') f.write(changes_txt) f.close() - run('git commit %s -m "prepare for %s release"' + run('git commit %s -m "%s"' % (changes_path, version)) # Tag version and push. curr_tags = set(t for t in _capture_stdout(["git", "tag", "-l"]).split('\n') if t) if not dry_run and version not in curr_tags: log.info("tag the release") - run('git tag -a "%s" -m "version %s"' % (version, version)) + date = time.strftime("%Y-%m-%d") + run('git tag -a "%s" -m "version %s (%s)"' % (version, version, date)) run('git push --tags') # Optionally release. @@ -248,7 +250,7 @@ def cutarelease(project_name, version_files, dry_run=False): f.close() if not dry_run: - run('git commit %s %s -m "prep for future dev"' % ( + run('git commit %s %s -m "bumpver for subsequent work"' % ( changes_path, ' '.join(version_files))) run('git push')