Author: navssurtani
Date: 2008-12-13 10:06:39 -0500 (Sat, 13 Dec 2008)
New Revision: 7322
Added:
searchable/trunk/src/main/java/org/jboss/cache/Version.java
Modified:
searchable/trunk/pom.xml
searchable/trunk/release.sh
Log:
Updated release script and added a Version.java
Modified: searchable/trunk/pom.xml
===================================================================
--- searchable/trunk/pom.xml 2008-12-13 11:49:23 UTC (rev 7321)
+++ searchable/trunk/pom.xml 2008-12-13 15:06:39 UTC (rev 7322)
@@ -31,7 +31,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
- <version>3.1.0.Beta2</version>
+ <version>3.1.0.Beta1</version>
</dependency>
<dependency>
Modified: searchable/trunk/release.sh
===================================================================
--- searchable/trunk/release.sh 2008-12-13 11:49:23 UTC (rev 7321)
+++ searchable/trunk/release.sh 2008-12-13 15:06:39 UTC (rev 7322)
@@ -1,3 +1,4 @@
+#!/bin/bash
# Variables
# SVN directory on repo: -
@@ -13,7 +14,7 @@
localMvn="/Users/Navin/Code/maven2_repo/org/jboss/cache/jbosscache-searchable"
# Docs
-docsDir="/Users/Navin/Code/ReleaseDocs"
+# docsDir="/Users/Navin/Code/ReleaseDocs"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@@ -35,7 +36,7 @@
then
echo "Missing version number!"
help
- exit 0
+ exit 1
fi
if [[ $ver =~ ^[1-9]\.[0-9]\.[0-9]\.(GA|(ALPHA|BETA|CR|SP)[1-9][0-9]?)$ ]]
@@ -45,7 +46,7 @@
else
echo "Incorrect version format for version $ver!"
help
- exit 0
+ exit 1
fi
echo "validate() function run ok!"
}
@@ -62,7 +63,9 @@
build()
{
- mvn clean deploy -Dmaven.test.skip.exec=True -PDocs
+ cd $localTagsDir
+ cd $ver
+ mvn clean deploy -Dmaven.test.skip.exec=true -PDocs
echo "build() function run ok!"
}
@@ -74,6 +77,16 @@
echo "checkIntoRepo function run ok!"
}
+setVersion()
+{
+ # Change pom.xml and Version.java
+ sed -e
"s/<jbosscache-searchable-version>[1-9]\.[0-9]\.[0-9]-SNAPSHOT/<jbosscache-searchable-version>$ver/g"
pom.xml > newpom.xml
+ mv newpom.xml pom.xml
+ sed -e "s/\"[1-9]\.[0-9]\.[0-9]-SNAPSHOT\"/\"$ver\"/g"
src/main/java/org/jboss/cache/Version.java > tmp.java
+ mv tmp.java src/main/java/org/jboss/cache/Version.java
+ svn ci -m "JBoss Cache Release Script: Updating $ver" pom.xml
src/main/java/org/jboss/cache/Version.java
+}
+
docs()
{
cd $docsDir
@@ -97,9 +110,10 @@
echo "This is the JBoss Cache Searchable release script"
validate
tag
+setVersion
build
checkIntoRepo
-docs
+#docs
echo 'Done!'
echo 'Update
www.jboss.org about new release'
echo 'Update wiki'
Added: searchable/trunk/src/main/java/org/jboss/cache/Version.java
===================================================================
--- searchable/trunk/src/main/java/org/jboss/cache/Version.java
(rev 0)
+++ searchable/trunk/src/main/java/org/jboss/cache/Version.java 2008-12-13 15:06:39 UTC
(rev 7322)
@@ -0,0 +1,16 @@
+package org.jboss.cache;
+
+/**
+ * Spits out the version number.
+ *
+ * @author Navin Surtani (<a
href="mailto:nsurtani@redhat.com">nsurtani@redhat.com</a>)
+ */
+public class Version
+{
+ //version string - should correspond with the version in the pom
+ private static final String version = "1.0.0-SNAPSHOT";
+ public static void main(String[] args)
+ {
+ System.out.println("\nJBoss Cache Searchable Edition\nVersion:\t" +
version + "\n\n");
+ }
+}