Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

(#57) Strips leading `v` from generated version numbers #58

Merged
merged 1 commit into from Feb 8, 2013

Conversation

Projects
None yet
2 participants
Contributor

tjmcs commented Feb 7, 2013

With this change, the build-bundle-file.sh script constructs a shell script that parses the git version numbers a bit differently so that the rebuild_iso.sh script will generate version numbers that are more consistent with how our version numbers used to look when that script is run with no arguments (previously, our Microkernel versions where simply numbers like "0.9.3.0", but with changes in the Microkernel build process made in late November and early December of 2012, this script was generating ISO files with versions that look more like "v0.9.3.0" instead). This change will remove the "v" prefix from the start of these versions (so that even though a tag of "v0.9.3.0" is used in the GitHub repository, the version number used in the ISO that is built from the repository contents will be "0.9.3.0".

Contributor

slippycheeze commented Feb 7, 2013

Hey. So, I can't see any effect from that change:

] git describe --tags --dirty --always | sed -e 's@-@+@' 
0.10.0+2-g2d84e61
] git describe --tags --dirty --always | sed -e 's@-@+@' | sed -e 's/^v\?\(.*\)$/\1/'
0.10.0+2-g2d84e61
] git checkout v0.9.3.0 
] git describe --tags --dirty --always | sed -e 's@-@+@'                             
v0.9.3.0
] git describe --tags --dirty --always | sed -e 's@-@+@' | sed -e 's/^v\?\(.*\)$/\1/'
v0.9.3.0

Can you tell me which version of git you are using? Perhaps this is a local setting, or something like that, which is causing this? I have 1.8.1.2 here, in the examples above. (I can strip any leading 'v' by changing that to sed -e 's@-@+@' -e 's/^v//' though...

Also, is this a problem that occurs with the 0.10.0 tag, or only with older tags? If it only applies to older tags I am inclined to just leave it be - we won't be reverting to the older version numbering scheme, so current and future builds will all be correct.

Finally, the summary line for this commit should be something like:

(#57) Strip leading `v` from generated version numbers

That includes the issue number as a prefix, and is a summary of what was done. This is important, because when we generate release notes they will be using the summary from git - git log --oneline 0.10.0.. or git shortlog.

That makes it important to focus on what a user reading the summary line - and only the summary line - will learn about the change from that single line.

(I am starting to think that we should drop the bug number prefix from the summary, too, since it adds little value compared to just putting it in the body.)

Contributor

tjmcs commented Feb 7, 2013

There are a couple of issues here:

  • the first issue has to do with the fact that we tagged our versions in the Razor-Microkernel project with a tag that looked like "v0.9.3.0", so the result of the git describe --tags --dirty --always | sed -e 's@-@+@' command includes a leading 'v' for those versions. If you tag the repository with a tag that looks like 0.10.0.0 instead of v0.10.0.0 then you won't see that leading 'v'.
  • if you happen to have a leading 'v' on the version number that is returned by that git ... | sed ... command, then the version that results isn't consistent with the format that we've been using for Razor-Microkernel versions since we first released a Microkernel (last March?)...

I'll be happy to change the summary line to reflect what's going on here. I am pretty sure that the existence (or non-existence) of the 'v' prefix in the version number that is generated is simply a result of the latest tag (and whether or not it includes a 'v' prefix), not the version of git being run...

Contributor

tjmcs commented Feb 7, 2013

Also, if you want me to simplify the pattern used in the last part of that git ... | sed ... | sed ... command chain to make it clearer, I'm more than happy to do so...sometimes I get a bit regexp-happy when doing these sorts of things since it can make things a bit more extensible down the line if we decide that there are other parts of other tags that are causing problems (like a "V" instead of a "v")...

Tom McSweeney Fixes issue #57 (generated version numbers have wrong format); with t…
…he change in this commit the build-bundle-file.sh script constructs a shell that parses the git version numbers a bit differently so that auto-generated version numbers for the Microkernel ISO are more consistent with the version numbers that were used in numbering our Razor Microkernel ISOs previously (versions like "0.9.3.0" instead of "v0.9.3.0").
70e85b0

@tjmcs tjmcs pushed a commit that referenced this pull request Feb 8, 2013

tjmcs Merge pull request #58 from tjmcs/tb/fix-default-version-format
(#57) Strips leading `v` from generated version numbers
104a9bc

@tjmcs tjmcs merged commit 104a9bc into puppetlabs:master Feb 8, 2013

@tjmcs tjmcs deleted the tjmcs:tb/fix-default-version-format branch Feb 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment