Skip to content

Commit

Permalink
Add ice version to omero.version for non-OMERO_BUILDs too
Browse files Browse the repository at this point in the history
Now any build run via ./build.py (or build.bat) will have
the current ice version appended to the omero.version value
(e.g. 4.3.3-ice34)
  • Loading branch information
joshmoore committed Jan 10, 2012
1 parent 3a63e3c commit 699aa7a
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,21 @@ def choose_omero_version():
If OMERO_BULID is set, then "-Domero.version=${omero-version}-${OMERO_BUILD}"
otherwise nothing.
"""

omero_build = os.environ.get("OMERO_BUILD", "")
if omero_build:
omero_build = "-%s" % omero_build

command = [ find_java(), "omero","-q","version" ]
try:
omero_build = os.environ["OMERO_BUILD"]
command = [ find_java(), "omero","-q","version" ]
try:
p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
omero_version,err = p.communicate()
omero_version = omero_version.split()[1]
return [ "-Domero.version=%s-%s" % (omero_version, omero_build) ]
except:
print "Error getting version for OMERO_BUILD=%s" % omero_build
print err
except KeyError, ke:
return [] # Use default
p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
omero_version,err = p.communicate()
omero_version = omero_version.split()[1]
return [ "-Domero.version=%s%s" % (omero_version, omero_build) ]
except:
print "Error getting version for OMERO_BUILD=%s" % omero_build
print err
sys.exit(rc)

def execute(args):
rc = subprocess.call(args)
Expand Down

0 comments on commit 699aa7a

Please sign in to comment.