summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShireesh Anjal <shireesh@gluster.com>2011-12-09 21:30:13 +0530
committerShireesh Anjal <shireesh@gluster.com>2011-12-09 21:32:07 +0530
commite987881635a28aa18b98f8bfbe80043afaf22094 (patch)
tree8e082be98d62cf260692c7de0e7ddba404b19905
parent3c0c4059e016f73b399f891ee8e84e2e01d54177 (diff)
Modified to use placeholder @VERSION@ instead of hard coding version number, and replacing the same at build time with required version number.
-rw-r--r--build/glustermc_build.properties4
-rwxr-xr-xbuild/gmc-build.sh21
-rw-r--r--src/org.gluster.storage.management.console/plugin.properties2
-rw-r--r--src/org.gluster.storage.management.gateway/WebContent/WEB-INF/web.xml6
-rw-r--r--src/org.gluster.storage.management.gateway/build/glusterserver.ant3
5 files changed, 22 insertions, 14 deletions
diff --git a/build/glustermc_build.properties b/build/glustermc_build.properties
index d50782d..33089eb 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 73fe63b..9c1c301 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 e9027ab..b61106d 100644
--- a/src/org.gluster.storage.management.console/plugin.properties
+++ b/src/org.gluster.storage.management.console/plugin.properties
@@ -17,7 +17,7 @@
# <http://www.gnu.org/licenses/>.
###############################################################################
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 dc00a35..d2f2b74 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 @@
<listener-class>org.gluster.storage.management.gateway.listeners.ShutdownListener</listener-class>
</listener>
<servlet>
- <servlet-name>gluster-resources-1.0</servlet-name>
+ <servlet-name>gluster-resources-@VERSION@</servlet-name>
<servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
@@ -58,8 +58,8 @@
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
- <servlet-name>gluster-resources-1.0</servlet-name>
- <url-pattern>/1.0.0/*</url-pattern>
+ <servlet-name>gluster-resources-@VERSION@</servlet-name>
+ <url-pattern>/@VERSION@/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>JnlpDownloadServlet</servlet-name>
diff --git a/src/org.gluster.storage.management.gateway/build/glusterserver.ant b/src/org.gluster.storage.management.gateway/build/glusterserver.ant
index 9ba36f5..d05a5fb 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 @@
<project name="org.gluster.storage.management.gateway" basedir="." default="archive">
- <echo message="basedir=${basedir}" />
- <echo message="buckminster.output=${buckminster.output}" />
<property name="WEB-INF" value="${basedir}/WebContent/WEB-INF" />
<property name="OUT" value="${buckminster.output}/glusterserver/" />
<property name="WAR_FILE_NAME" value="glustermg.war" />
@@ -59,6 +57,7 @@
<exclude name="**/servlet-api.jar" />
</fileset>
</copy>
+ <replace file="${TEMP}/WEB-INF/web.xml" token="@VERSION@" value="${product.version}" />
<war destfile="${OUT}/${WAR_FILE_NAME}" basedir="${TEMP}" compress="true" webxml="${TEMP}/WEB-INF/web.xml" />
<delete dir="${TEMP}" />
</target>