Skip to content

Commit

Permalink
Strip git describe version when not on hudson
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmoore committed Jan 20, 2012
1 parent 949e0aa commit 346f71b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# General build scripts.

import os
import re
import sys
import time
import subprocess
Expand Down Expand Up @@ -123,6 +124,15 @@ def choose_omero_version():
p = popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
omero_version, err = p.communicate()
omero_version = omero_version.split()[1]

# If we're not on hudson, then we don't want to force
# users to deal with rebuilding after each commit.
# Instead, drop everything except for "-DEV"
#
# See gh-67 for the discussion.
if not omero_build:
omero_version = re.sub("([-]DEV)?-\d+-g[^-]+[+]?",\
"-DEV", omero_version)
return [ "-Domero.version=%s%s" % (omero_version, omero_build) ]
except:
print "Error getting version for OMERO_BUILD=%s" % omero_build
Expand Down

0 comments on commit 346f71b

Please sign in to comment.