summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShireesh Anjal <shireesh@gluster.com>2011-12-13 12:25:12 +0530
committerShireesh Anjal <shireesh@gluster.com>2011-12-13 12:25:12 +0530
commit4fd6f148afaa24edd03f296cd2c200be9b59458b (patch)
tree70a70bd018ea90a7182808818197b10ef9e7331f
parent4f3688f198656746238b3ee61ac1001458b503ec (diff)
Modified Utils.py to use version placeholder @VERSION@ while forming commandPath, which will be replaced with actual version number during build.
-rwxr-xr-xbuild/package-gateway.sh6
-rw-r--r--src/org.gluster.storage.management.gateway.scripts/src/common/Utils.py2
2 files changed, 6 insertions, 2 deletions
diff --git a/build/package-gateway.sh b/build/package-gateway.sh
index 67bec4b..c6bbce8 100755
--- a/build/package-gateway.sh
+++ b/build/package-gateway.sh
@@ -22,7 +22,7 @@
WAR_NAME="glustermg.war"
WAR_SCRIPTS_DIR=${WAR_NAME}/scripts
NEW_WAR_NAME="glustermg"
-VERSION=${VERSION:-1.0.0-alpha}
+VERSION=${VERSION:-1.0.0alpha}
TAR_NAME=${NEW_WAR_NAME}-${VERSION}.war.tar
INSTALL_SCRIPT_NAME=gmg-install.sh
INSTALLER_TAR_NAME=gmg-installer-${VERSION}.tar
@@ -43,6 +43,10 @@ get-server-war()
cd ${WAR_NAME}
WAR_FILE=`find -L ${SERVER_DIST_DIR} -name ${WAR_NAME}`
jar xvf ${WAR_FILE}
+
+ # Update version number in Utils.py
+ sed -i "s/@VERSION@/${VERSION}/g" scripts/Utils.py
+
chmod +x scripts/*
cd -
}
diff --git a/src/org.gluster.storage.management.gateway.scripts/src/common/Utils.py b/src/org.gluster.storage.management.gateway.scripts/src/common/Utils.py
index bdc47f6..597f3fb 100644
--- a/src/org.gluster.storage.management.gateway.scripts/src/common/Utils.py
+++ b/src/org.gluster.storage.management.gateway.scripts/src/common/Utils.py
@@ -43,7 +43,7 @@ sshCommandPrefix = "ssh -l root -q -i /opt/glustermg/keys/gluster.pem -o BatchMo
try:
commandPath = "/opt/glustermg/%s/backend" % os.environ['GMG_VERSION']
except KeyError, e:
- commandPath = "/opt/glustermg/1.0.0/backend"
+ commandPath = "/opt/glustermg/@VERSION@/backend"
def log(priority, message=None):
global logOpened