From e987881635a28aa18b98f8bfbe80043afaf22094 Mon Sep 17 00:00:00 2001 From: Shireesh Anjal Date: Fri, 9 Dec 2011 21:30:13 +0530 Subject: Modified to use placeholder @VERSION@ instead of hard coding version number, and replacing the same at build time with required version number. --- build/glustermc_build.properties | 4 +++- build/gmc-build.sh | 21 ++++++++++++++------- .../plugin.properties | 2 +- .../WebContent/WEB-INF/web.xml | 6 +++--- .../build/glusterserver.ant | 3 +-- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/build/glustermc_build.properties b/build/glustermc_build.properties index d50782d8..33089eb1 100644 --- a/build/glustermc_build.properties +++ b/build/glustermc_build.properties @@ -4,8 +4,10 @@ #buckminster.output.root=/tmp/buckminster/glustermc # Where the temp files should go #buckminster.temp.root=/tmp/buckminster + # How .qualifier in versions should be replaced -qualifier.replacement.*=generator:lastRevision +qualifier.replacement.*=generator:buildTimestamp +generator.buildTimestamp.format='v'yyyyMMdd-HHmm # Do not include source cbi.include.source=false diff --git a/build/gmc-build.sh b/build/gmc-build.sh index 73fe63b6..9c1c301e 100755 --- a/build/gmc-build.sh +++ b/build/gmc-build.sh @@ -26,6 +26,7 @@ BUCKMINSTER_URL=http://download.eclipse.org/tools/buckminster/headless-3.7/ BUCKMINSTER_PRODUCT_NAME=org.eclipse.buckminster.cmdline.product GMC_WEBSTART_PROJECT=org.gluster.storage.management.console.feature.webstart GMC_CORE_PROJECT=org.gluster.storage.management.core +GMC_CONSOLE_PROJECT=org.gluster.storage.management.console GMG_PROJECT=org.gluster.storage.management.gateway startBold() @@ -124,6 +125,11 @@ configure_workspace() cd - } +buckminster_perform() +{ + ${BUCKMINSTER_HOME}/buckminster perform --properties ${PROPERTIES_FILE} -Dbuckminster.output.root=${DIST_DIR} -data ${WORKSPACE_DIR} $* +} + build_gmc() { os=${1} @@ -139,13 +145,14 @@ build_gmc() ${BUCKMINSTER_HOME}/buckminster import -data ${WORKSPACE_DIR} build/org.gluster.storage.management.console.feature.webstart.cquery echo "Building GMC for [${os}.${ws}.${arch}]" - ${BUCKMINSTER_HOME}/buckminster perform -Dbuckminster.output.root=${DIST_DIR} -data ${WORKSPACE_DIR} -Dtarget.os=${os} -Dtarget.ws=${ws} -Dtarget.arch=${arch} -Dcbi.include.source=false --properties ${PROPERTIES_FILE} ${GMC_WEBSTART_PROJECT}#create.eclipse.jnlp.product - ${BUCKMINSTER_HOME}/buckminster perform -Dbuckminster.output.root=${DIST_DIR} -data ${WORKSPACE_DIR} --properties ${PROPERTIES_FILE} ${GMC_WEBSTART_PROJECT}#copy.root.files + buckminster_perform -Dproduct.version=${VERSION} ${GMC_CONSOLE_PROJECT}#update.version + buckminster_perform -Dtarget.os=${os} -Dtarget.ws=${ws} -Dtarget.arch=${arch} ${GMC_WEBSTART_PROJECT}#create.eclipse.jnlp.product + buckminster_perform ${GMC_WEBSTART_PROJECT}#copy.root.files # buckminster signs the jars using eclipse certificate - hence unsign and sign them again echo "Signing product jars..." - ${BUCKMINSTER_HOME}/buckminster perform -data ${WORKSPACE_DIR} -Dbuckminster.output.root=${DIST_DIR} --properties ${PROPERTIES_FILE} ${GMC_WEBSTART_PROJECT}#unsign.jars - ${BUCKMINSTER_HOME}/buckminster perform -data ${WORKSPACE_DIR} -Dbuckminster.output.root=${DIST_DIR} -Djar.signing.keystore=${KEYS_DIR}/gluster.keystore --properties ${PROPERTIES_FILE} ${GMC_WEBSTART_PROJECT}#sign.jars + buckminster_perform ${GMC_WEBSTART_PROJECT}#unsign.jars + buckminster_perform -Djar.signing.keystore=${KEYS_DIR}/gluster.keystore ${GMC_WEBSTART_PROJECT}#sign.jars } build_gmg() @@ -161,10 +168,10 @@ build_gmg() ${BUCKMINSTER_HOME}/buckminster import -data ${WORKSPACE_DIR} build/org.gluster.storage.management.gateway.cquery echo "Building CORE..." - ${BUCKMINSTER_HOME}/buckminster perform -Dbuckminster.output.root=${DIST_DIR} -data ${WORKSPACE_DIR} -Dcbi.include.source=false --properties ${PROPERTIES_FILE} ${GMC_CORE_PROJECT}#bundle.jar + buckminster_perform ${GMC_CORE_PROJECT}#bundle.jar echo "Building Gateway..." - ${BUCKMINSTER_HOME}/buckminster perform -Dbuckminster.output.root=${DIST_DIR} -data ${WORKSPACE_DIR} -Dcbi.include.source=false --properties ${PROPERTIES_FILE} ${GMG_PROJECT}#archive + buckminster_perform -Dproduct.version=${VERSION} ${GMG_PROJECT}#archive echo "Packaging Gateway..." ${SCRIPT_DIR}/package-gateway.sh ${DIST_DIR} ${DIST_BASE}/gmc @@ -195,7 +202,7 @@ build_gmc_all() build() { - export VERSION=1.0.0-alpha + export VERSION=${VERSION:-1.0.0alpha} build_gmc_all build_gmg package_backend diff --git a/src/org.gluster.storage.management.console/plugin.properties b/src/org.gluster.storage.management.console/plugin.properties index e9027ab1..b61106df 100644 --- a/src/org.gluster.storage.management.console/plugin.properties +++ b/src/org.gluster.storage.management.console/plugin.properties @@ -17,7 +17,7 @@ # . ############################################################################### aboutText=Gluster Management Console\n\ -Version: 1.0.0-alpha\n\n\ +Version: @VERSION@\n\n\ Copyright (c) 2011 Gluster, Inc.\n\ Visit http://www.gluster.com/\n\n\ This product includes software developed by the\n\ diff --git a/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/web.xml b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/web.xml index dc00a356..d2f2b742 100644 --- a/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/web.xml +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/web.xml @@ -45,7 +45,7 @@ org.gluster.storage.management.gateway.listeners.ShutdownListener - gluster-resources-1.0 + gluster-resources-@VERSION@ com.sun.jersey.spi.spring.container.servlet.SpringServlet com.sun.jersey.config.property.packages @@ -58,8 +58,8 @@ 1 - gluster-resources-1.0 - /1.0.0/* + gluster-resources-@VERSION@ + /@VERSION@/* JnlpDownloadServlet diff --git a/src/org.gluster.storage.management.gateway/build/glusterserver.ant b/src/org.gluster.storage.management.gateway/build/glusterserver.ant index 9ba36f55..d05a5fb9 100644 --- a/src/org.gluster.storage.management.gateway/build/glusterserver.ant +++ b/src/org.gluster.storage.management.gateway/build/glusterserver.ant @@ -1,6 +1,4 @@ - - @@ -59,6 +57,7 @@ + -- cgit