Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --match v.[0-9]* to git describe #1857

Merged
merged 3 commits into from
Dec 5, 2013

Conversation

joshmoore
Copy link
Member

In order to prevent non-official tags from causing
server/client version breakage, filter out all non
official-looking tags, i.e. "v.4.4.9"

see: http://trac.openmicroscopy.org.uk/ome/ticket/11727

Testing

  • All jobs should remain green and version numbers should still look reasonable.
  • Adding a fake ticket (git tag -a foo_bar) should NOT affect the output of ./build.py version

In order to prevent non-official tags from causing
server/client version breakage, filter out all non
official-looking tags, i.e. "v.4.4.9"
@sbesson
Copy link
Member

sbesson commented Dec 3, 2013

sebastien@c016153:openmicroscopy ((6ad4e86...)) $ bash test_1857 
+ git checkout snoopycrimecop/merge/develop/latest
M   components/bioformats
M   components/tools/OmeroPy/scripts
M   docs/sphinx
HEAD is now at 6ad4e86... merge develop -D org -I include -E exclude
+ git describe
v.5.0.0-beta1-1812-g6ad4e86
+ ./build.py version
Buildfile: /Users/sebastien/code/ome/openmicroscopy/build.xml

version:
5.0.0-beta1-1812-6ad4e86-dirty-ice34

BUILD SUCCESSFUL
Total time: 0 seconds
+ git tag v.5.5.5 'HEAD^' -m 'Tag version 5.5.5'
+ git describe
v.5.5.5-1-g6ad4e86
+ ./build.py version
Buildfile: /Users/sebastien/code/ome/openmicroscopy/build.xml

version:
5.5.5-1-6ad4e86-dirty-ice34

BUILD SUCCESSFUL
Total time: 0 seconds
+ git tag -d v.5.5.5
Deleted tag 'v.5.5.5' (was d81e3fc)
+ git tag v.5.5.5 HEAD -m 'Tag version 5.5.5'
+ git describe
v.5.5.5
+ ./build.py version
Buildfile: /Users/sebastien/code/ome/openmicroscopy/build.xml

version:
5.5.5-dirty-ice34

BUILD SUCCESSFUL
Total time: 0 seconds
+ git tag -d v.5.5.5
Deleted tag 'v.5.5.5' (was 960eca2)
+ git tag glencoe/v.5.5.5 'HEAD^' -m 'Tag version glencoe/5.5.5'
+ git describe
glencoe/v.5.5.5-1-g6ad4e86
+ ./build.py version
Buildfile: /Users/sebastien/code/ome/openmicroscopy/build.xml

version:
5.0.0-beta1-1812-6ad4e86-dirty-ice34

BUILD SUCCESSFUL
Total time: 0 seconds
+ git tag -d glencoe/v.5.5.5
Deleted tag 'glencoe/v.5.5.5' (was 231975d)
+ git tag v.5-glencoe 'HEAD^' -m 'Tag version glencoe/5.5.5'
+ git describe
v.5-glencoe-1-g6ad4e86
+ ./build.py version
Buildfile: /Users/sebastien/code/ome/openmicroscopy/build.xml

version:
5-lencoe-1-g6ad4e86-dirty-ice34

BUILD SUCCESSFUL
Total time: 0 seconds
+ git tag -d v.5-glencoe
Deleted tag 'v.5-glencoe' (was 0a30447)

The odd case where the custom tag starts with v.[0-9] put aside, the tag filter works as expected and should fix Glencoe/third-party issues with non-official tags.

@joshmoore
Copy link
Member Author

Added a commit to make the value externally configurable. Do you think the following would be a better default?

$ ./build.py version '-Dgitmatch=v.[0-9]*.[0-9]*.[0-9]*'
Buildfile: /tmp/ome/build.xml

version:
5.0.0-beta1-1607-0be8b88-dirty-ice35

@sbesson
Copy link
Member

sbesson commented Dec 4, 2013

@joshmoore: since we committed to using semantic versioning for our version numbers, I would think v.[0-9]*.[0-9]*.[0-9]* is a reasonable default.

@joshmoore
Copy link
Member Author

Commit for semver pushed.

@sbesson
Copy link
Member

sbesson commented Dec 5, 2013

M   components/bioformats
M   components/tools/OmeroPy/scripts
M   docs/sphinx
Note: checking out 'snoopycrimecop/merge/develop/latest'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 4de9f1f... merge develop -D org -I include -E exclude
sebastien@LS27175:openmicroscopy ((4de9f1f...)) $ python build.py version
Buildfile: /Users/sebastien/code/ome/openmicroscopy/build.xml

version:
5.0.0-beta2-RC2-263-4de9f1f-dirty-ice34

BUILD SUCCESSFUL
Total time: 0 seconds
sebastien@LS27175:openmicroscopy ((4de9f1f...)) $ git tag v.5.5.5 HEAD^ -m "Tag 5.5.5"
sebastien@LS27175:openmicroscopy ((4de9f1f...)) $ python build.py version
Buildfile: /Users/sebastien/code/ome/openmicroscopy/build.xml

version:
5.5.5-1-4de9f1f-dirty-ice34

BUILD SUCCESSFUL
Total time: 0 seconds
sebastien@LS27175:openmicroscopy ((4de9f1f...)) $ git tag -d v.5.5.5 
Deleted tag 'v.5.5.5' (was c9e4a52)
sebastien@LS27175:openmicroscopy ((4de9f1f...)) $ git tag v.5.dummytag HEAD^ -m "Tag 5.5.5"
sebastien@LS27175:openmicroscopy ((4de9f1f...)) $ python build.py version
Buildfile: /Users/sebastien/code/ome/openmicroscopy/build.xml

version:
5.0.0-beta2-RC2-263-4de9f1f-dirty-ice34

BUILD SUCCESSFUL
Total time: 0 seconds
sebastien@LS27175:openmicroscopy ((4de9f1f...)) $ git tag -d v.5.dummytag 
Deleted tag 'v.5.dummytag' (was 85e382b)
sebastien@LS27175:openmicroscopy ((4de9f1f...)) $ git tag gs/v.5.5.5 HEAD^ -m "Tag 5.5.5"
sebastien@LS27175:openmicroscopy ((4de9f1f...)) $ python build.py version
Buildfile: /Users/sebastien/code/ome/openmicroscopy/build.xml

version:
5.0.0-beta2-RC2-263-4de9f1f-dirty-ice34

BUILD SUCCESSFUL
Total time: 0 seconds
sebastien@LS27175:openmicroscopy ((4de9f1f...)) $ git tag -d gs/v.5.5.5 
Deleted tag 'gs/v.5.5.5' (was 6807897)

Looks good. Are you planning any additional change?

@joshmoore
Copy link
Member Author

No sir.

sbesson added a commit that referenced this pull request Dec 5, 2013
Add `--match v.[0-9]*` to `git describe`
@sbesson sbesson merged commit 78eae07 into ome:develop Dec 5, 2013
@joshmoore
Copy link
Member Author

--rebased-to #1879

@joshmoore joshmoore deleted the 11727-git-describe branch January 23, 2014 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants