From 5b90cfe6abd5eb923e840890a59a8f0d695c6aad Mon Sep 17 00:00:00 2001 From: jmoore Date: Thu, 29 Apr 2010 08:21:22 +0000 Subject: [PATCH] see #1750 - Build fixes for simplifying model creation / testing NB: This allows the following usage of `bin/omero db script` {{{ FILE=`omero db script "" "" ome | perl -pe 's/^Saving to (.*?)$/$1/'` psql omero -f $FILE }}} git-svn-id: file:///home/svn/omero/trunk@6744 05709c45-44f0-0310-885b-81a1db45b4a6 --- build.py | 5 +++-- build.xml | 13 +++++-------- components/blitz/build.xml | 3 ++- components/dsl/ivy.xml | 2 +- components/model/build.xml | 4 +++- components/tools/OmeroPy/src/omero/plugins/db.py | 8 ++++---- 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/build.py b/build.py index 593d804bfa8..db7ed527937 100755 --- a/build.py +++ b/build.py @@ -136,5 +136,6 @@ def execute(args): except KeyboardInterrupt: sys.stderr.write("\nCancelled by user\n") sys.exit(2) - except SystemExit: - notification(""" Failed: %s """ % " ".join(args), 100) + except SystemExit, se: + notification(""" Failed: %s """ % " ".join(args), 100) + sys.exit(se.code) diff --git a/build.xml b/build.xml index 04df69679db..014f7eb6b4d 100644 --- a/build.xml +++ b/build.xml @@ -131,7 +131,7 @@ java component. - + @@ -139,7 +139,7 @@ java component. - + @@ -148,7 +148,7 @@ java component. - + @@ -536,9 +536,7 @@ java component. Top-level helpers (shared helpers are in components/antlib/resources) ===================================================================== --> - - - + @@ -587,8 +585,7 @@ omero.version=${omero.version} - - + ${omero.version} diff --git a/components/blitz/build.xml b/components/blitz/build.xml index 635a5c58d37..a71d34ab088 100644 --- a/components/blitz/build.xml +++ b/components/blitz/build.xml @@ -14,7 +14,8 @@ - + + diff --git a/components/dsl/ivy.xml b/components/dsl/ivy.xml index e52cf9ad337..5b9566a4099 100644 --- a/components/dsl/ivy.xml +++ b/components/dsl/ivy.xml @@ -16,7 +16,7 @@ - + diff --git a/components/model/build.xml b/components/model/build.xml index 4c35243c068..e244b863ffe 100644 --- a/components/model/build.xml +++ b/components/model/build.xml @@ -68,8 +68,10 @@ - + + + diff --git a/components/tools/OmeroPy/src/omero/plugins/db.py b/components/tools/OmeroPy/src/omero/plugins/db.py index b3ec0587db8..0ab4c38d55d 100644 --- a/components/tools/OmeroPy/src/omero/plugins/db.py +++ b/components/tools/OmeroPy/src/omero/plugins/db.py @@ -91,7 +91,7 @@ def _create(self, sql_directory, db_vers, db_patch, password_hash, location = No location = path().getcwd() / script output = open(location, 'w') - print "Saving to " + location + self.ctx.out("Saving to " + location) try: output.write(""" @@ -151,11 +151,11 @@ def script(self, *args): if len(db_patch) == 0: db_patch = data2.properties.getProperty("omero.db.patch") data.properties.setProperty("omero.db.version", db_vers) - self.ctx.out("Using %s for version" % db_vers) + self.ctx.err("Using %s for version" % db_vers) data.properties.setProperty("omero.db.patch", db_patch) - self.ctx.out("Using %s for patch" % db_patch) + self.ctx.err("Using %s for patch" % db_patch) root_pass = args.args[2] - self.ctx.out("Using password from commandline") + self.ctx.err("Using password from commandline") except Exception, e: self.ctx.dbg("While getting arguments:"+str(e)) self._lookup(data, data2, "version", map)