aurora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Farner <wfar...@apache.org>
Subject Re: [DISCUSS] Use $(git describe) output to bake version instead of .auroraversion
Date Tue, 08 Apr 2014 03:35:22 GMT
Plucking from the man page:

NAME
       git-describe - Show the most recent tag that is reachable from a
commit

Does this proposal fall apart if/when we start using tags for other
purposes?

-=Bill


On Mon, Apr 7, 2014 at 8:05 PM, Kevin Sweeney <kevints@apache.org> wrote:

> Hi all,
>
> Summarizing an IRC discussion with Bhuvan Arumugam I'm convinced we should
> use git-describe(1)<
> https://www.kernel.org/pub/software/scm/git/docs/git-describe.html>
> to
> generate the embedded version string instead of .auroraversion.
>
> This will require 2 changes. The first is to use git-describe instead of
> .auroraversion in our Pants and Gradle buildscripts. The second is to
> update release scripts to create a "v-next-snapshot" annotated tag on
> master each time we finalize a release.
>
> I think the best way to show it is with this example:
>
> If I create a tag when .auroraversion is updated to a new -snapshot on
> master like so (we haven't had a release yet but assume I did this during
> the release of 0.4.0):
>
> % git tag -a -m 'Create 0.5.0-snapshot' 0.5.0-snapshot
> 19e087509cfd6c86c9928ca6c8e8b40068a64f39
>
> Now git-describe gives very nice output on master (we're 192 commits ahead,
> and the short hash is there for disambiguation).
> % git checkout master
> % git describe
> 0.5.0-snapshot-192-g8846655
>
> Now say I make a new commit.
>
> % cowsay "May the Force be with you" >> README.md
> % git diff
> diff --git a/README.md b/README.md
> index 82096f6..9caf267 100644
> --- a/README.md
> +++ b/README.md
> @@ -9,3 +9,11 @@ Getting Started
>  * [Deploying Aurora](docs/deploying-aurora-scheduler.md)
>  * [Running a Local Cluster with Vagrant](docs/vagrant.md)
>  * More docs coming soon!
> + ___________________________
> +< May the Force be with you >
> + ---------------------------
> +        \   ^__^
> +         \  (oo)\_______
> +            (__)\       )\/\
> +                ||----w |
> +                ||     ||
>
> % git commit -a -m 'Enhance README'
> [master 3aef8fd] Enhance README
>  1 file changed, 8 insertions(+)
>
> % git describe
> 0.5.0-snapshot-193-g3aef8fd
>
> Now I have a new unambiguous version number that's monotonically increasing
> according to both setuptools and Maven and I didn't need to create dev tags
> at all or create a new commit with .auroraversion at all.
>
> % python
> > Python 2.7.5+ (default, Feb 27 2014, 19:37:08)
> > [GCC 4.8.1] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> from pkg_resources import parse_version
> > >>> parse_version('0.5.0-snapshot-193-g3aef8fd') >
> > parse_version('0.5.0-snapshot-192-g8846655')
> > True
>
>
>
> > % jython2.7b1/bin/jython -J-cp Downloads/maven-artifact-3.2.1.jar
> > Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=utf8
> > *sys-package-mgr*: processing new jar,
> > '/home/ksweeney/Downloads/maven-artifact-3.2.1.jar'
> > Jython 2.7b1 (default:ac42d59644e9, Feb 9 2013, 15:24:52)
> > [OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.7.0_51
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> from org.apache.maven.artifact.versioning import ComparableVersion
> > >>> ComparableVersion('0.5.0-snapshot-193-g3aef8fd') >
> > ComparableVersion('0.5.0-snapshot-192-g8846655')
> > True
> >
>
> Please discuss.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message