Merge lp:~mabac/linaro-image-tools/display-version into lp:linaro-image-tools/11.11
Proposed by
Mattias Backman
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Loïc Minier | ||||
Approved revision: | 443 | ||||
Merged at revision: | 439 | ||||
Proposed branch: | lp:~mabac/linaro-image-tools/display-version | ||||
Merge into: | lp:linaro-image-tools/11.11 | ||||
Diff against target: |
106 lines (+17/-9) 5 files modified
do-release (+8/-5) linaro-hwpack-create (+2/-1) linaro_image_tools/__version__.py (+1/-0) linaro_image_tools/media_create/__init__.py (+3/-2) setup.py (+3/-1) |
||||
To merge this branch: | bzr merge lp:~mabac/linaro-image-tools/display-version | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
linaro-image-tools maintainers | Pending | ||
Review via email:
|
Description of the change
Hi,
This branch enables the -v/--version option for linaro-
The setup.py file is changed to get the version from __version__.py and do-release is changed to update the version in that py file.
Thanks,
Mattias
To post a comment you must log in.
overall happy with the changes, just some minor points:
On Mon, Oct 03, 2011, Mattias Backman wrote: [[:space: ]]*version= \"\\)[^ \"]*\", \$/\1$version\ ",/" setup.py \"]*\"\ $/\1$version\ "/" linaro_ image_tools/ __version_ _.py image-tools- $version. tar.gz" [[:space: ]]*version= \"\\)[^ \"]*\", \$/\1$version. 1\",/" setup.py \"]*\"\ $/\1$version. 1 (devel)\"/" linaro_ image_tools/ __version_ _.py
> === modified file 'do-release'
> --- do-release 2011-05-23 15:07:05 +0000
> +++ do-release 2011-10-03 08:48:54 +0000
> @@ -47,8 +47,8 @@
> die "Tag $version already exists"
> fi
>
> -log_i "Setting version to $version in setup.py"
> -sed -i "s/^\\(
> +log_i "Setting version to $version in __version__.py"
> +sed -i "s/^\\(__version__\ =\ \"\\)[^
>
> log_i "Committing $version"
> bzr commit -m "Release $version"
> @@ -68,8 +68,8 @@
> log_i "Signing tarball"
> gpg --armor --sign --detach-sig "../linaro-
>
> -log_i "Setting version to $version.1 in setup.py"
> -sed -i "s/^\\(
> +log_i "Setting version to $version (devel) in __version__.py"
> +sed -i "s/^\\(__version__\ =\ \"\\)[^
Might be worth factoring these seds into a set_version() function.
The \\( \\) were to preserve spacing in setup.py which could happen
within complex formatting, but given that version.py just holds the
version = string, I think you could be more aggressive in your sed:
sed -i "s/^version =.*/version = $version/" version.py
which would make the sed much easier to read than it is in the current
version!
> +__version__ = "2011.09.1 (devel)"
Could we keep the version entirely numeric? I'd much prefer if that media-create, and dealing with alphanumeric is just a bit
was the case because it would allow for e.g. easy version comparison if
we needed that. For instance external scripts could verify the version
of linaro-
harder than splitting on . for major/minor version numbers.
Thanks!
--
Loïc Minier