From patchwork Wed Oct 5 09:21:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattias Backman X-Patchwork-Id: 4516 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 204A823DEF for ; Wed, 5 Oct 2011 09:21:15 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id 0E49FA18ACD for ; Wed, 5 Oct 2011 09:21:15 +0000 (UTC) Received: by eyb6 with SMTP id 6so1911223eyb.11 for ; Wed, 05 Oct 2011 02:21:14 -0700 (PDT) Received: by 10.223.94.134 with SMTP id z6mr1021076fam.8.1317806474864; Wed, 05 Oct 2011 02:21:14 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.23.170 with SMTP id n10cs85626laf; Wed, 5 Oct 2011 02:21:14 -0700 (PDT) Received: by 10.227.113.74 with SMTP id z10mr2712781wbp.14.1317806474096; Wed, 05 Oct 2011 02:21:14 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id fn12si662313wbb.14.2011.10.05.02.21.13 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Oct 2011 02:21:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1RBNf7-0003J7-G1 for ; Wed, 05 Oct 2011 09:21:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 6BB8EE1573 for ; Wed, 5 Oct 2011 09:21:13 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: linaro-image-tools X-Launchpad-Branch: ~linaro-image-tools/linaro-image-tools/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 439 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-image-tools/linaro-image-tools/trunk] Rev 439: Enable -v/--version option. Message-Id: <20111005092113.2211.62346.launchpad@ackee.canonical.com> Date: Wed, 05 Oct 2011 09:21:13 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14085"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 3b201f2223b4b3b316ba881d1d656776362208e3 Merge authors: Mattias Backman (mabac) Related merge proposals: https://code.launchpad.net/~mabac/linaro-image-tools/display-version/+merge/77872 proposed by: Mattias Backman (mabac) ------------------------------------------------------------ revno: 439 [merge] committer: Mattias Backman branch nick: trunl timestamp: Wed 2011-10-05 11:12:42 +0200 message: Enable -v/--version option. added: linaro_image_tools/__version__.py modified: do-release linaro-hwpack-create linaro_image_tools/media_create/__init__.py setup.py --- lp:linaro-image-tools https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk You are subscribed to branch lp:linaro-image-tools. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk/+edit-subscription === modified file 'do-release' --- do-release 2011-05-23 15:07:05 +0000 +++ do-release 2011-10-04 09:34:27 +0000 @@ -22,6 +22,11 @@ exit 1 } +set_version() { + log_i "Setting version to $1 in __version__.py" + sed -i "s/^__version__ =.*/__version__ = \"$1\"/" linaro_image_tools/__version__.py +} + version="$1" if [ -z "$version" ]; then @@ -47,8 +52,7 @@ die "Tag $version already exists" fi -log_i "Setting version to $version in setup.py" -sed -i "s/^\\([[:space:]]*version=\"\\)[^\"]*\",\$/\1$version\",/" setup.py +set_version $version log_i "Committing $version" bzr commit -m "Release $version" @@ -68,8 +72,7 @@ log_i "Signing tarball" gpg --armor --sign --detach-sig "../linaro-image-tools-$version.tar.gz" -log_i "Setting version to $version.1 in setup.py" -sed -i "s/^\\([[:space:]]*version=\"\\)[^\"]*\",\$/\1$version.1\",/" setup.py +set_version "$version.1" -log_i "Committing $version" +log_i "Committing $version.1" bzr commit -m "Post-release version bump to $version.1" === modified file 'linaro-hwpack-create' --- linaro-hwpack-create 2011-05-25 15:47:02 +0000 +++ linaro-hwpack-create 2011-10-03 08:18:45 +0000 @@ -27,9 +27,10 @@ from linaro_image_tools.hwpack.builder import ( ConfigFileMissing, HardwarePackBuilder) +from linaro_image_tools.__version__ import __version__ if __name__ == '__main__': - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(version='%(prog)s ' + __version__) parser.add_argument( "CONFIG_FILE", help="The configuration file to take the hardware pack information " === added file 'linaro_image_tools/__version__.py' --- linaro_image_tools/__version__.py 1970-01-01 00:00:00 +0000 +++ linaro_image_tools/__version__.py 2011-10-04 10:51:40 +0000 @@ -0,0 +1,1 @@ +__version__ = "2011.09.1" === modified file 'linaro_image_tools/media_create/__init__.py' --- linaro_image_tools/media_create/__init__.py 2011-08-19 14:04:54 +0000 +++ linaro_image_tools/media_create/__init__.py 2011-10-03 08:18:45 +0000 @@ -21,6 +21,7 @@ from linaro_image_tools.media_create.boards import board_configs from linaro_image_tools.media_create.android_boards import android_board_configs +from linaro_image_tools.__version__ import __version__ KNOWN_BOARDS = board_configs.keys() @@ -47,7 +48,7 @@ def get_args_parser(): """Get the ArgumentParser for the arguments given on the command line.""" - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(version='%(prog)s ' + __version__) group = parser.add_mutually_exclusive_group(required=True) group.add_argument( '--mmc', dest='device', help='The storage device to use.') @@ -128,7 +129,7 @@ def get_android_args_parser(): """Get the ArgumentParser for the arguments given on the command line.""" - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(version='%(prog)s ' + __version__) group = parser.add_mutually_exclusive_group(required=True) group.add_argument( '--mmc', dest='device', help='The storage device to use.') === modified file 'setup.py' --- setup.py 2011-09-23 07:41:58 +0000 +++ setup.py 2011-10-03 08:37:32 +0000 @@ -2,10 +2,12 @@ # https://launchpad.net/python-distutils-extra import DistUtilsExtra.auto +from linaro_image_tools.__version__ import __version__ + DistUtilsExtra.auto.setup( name="linaro-image-tools", - version="2011.09.1", + version=__version__, description="Tools to create and write Linaro images", url="https://launchpad.net/linaro-image-tools", license="GPL v3 or later",