Author: navssurtani
Date: 2008-12-02 10:18:48 -0500 (Tue, 02 Dec 2008)
New Revision: 7236
Added:
searchable/trunk/release.sh
Log:
Added release.sh
Added: searchable/trunk/release.sh
===================================================================
--- searchable/trunk/release.sh (rev 0)
+++ searchable/trunk/release.sh 2008-12-02 15:18:48 UTC (rev 7236)
@@ -0,0 +1,109 @@
+# Variables
+
+# SVN directory on repo: -
+svnRepo="https://svn.jboss.org/repos/jbosscache/searchable"
+
+# SVN tags on repo: -
+svnTags="tags"
+
+# Local tags dir
+localTags="/Users/Navin/Code/JBossCacheSearchable/tags"
+
+# Local maven2 repo
+localMvn="/Users/Navin/Code/maven2_repo/org/jboss/cache/jbosscache-searchable"
+
+# Docs
+docsDir="/Users/Navin/Code/ReleaseDocs"
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+# Functions that will be called
+
+help()
+{
+ echo 'How to use this script'
+ echo
+ echo 'Call $ release.sh <VersionOfJBCS>'
+ echo
+ echo 'Example: - $ release.sh 1.1.1.CR1'
+ echo
+}
+
+validate()
+{
+ if [ ! $ver ]
+ then
+ echo "Missing version number!"
+ help
+ exit 0
+ fi
+
+ if [[ $ver =~ ^[1-9]\.[0-9]\.[0-9]\.(GA|(ALPHA|BETA|CR|SP)[1-9][0-9]?)$ ]]
+ then
+ #matches!
+ echo "Releasing version $ver"
+ else
+ echo "Incorrect version format for version $ver!"
+ help
+ exit 0
+ fi
+ echo "validate() function run ok!"
+}
+
+
+tag()
+{
+ svn cp ${svnRepo}/trunk ${svnRepo}/${svnTags}/$ver -m "JBoss Cache Searchable
Release Script: Tagging $ver"
+ cd $localTagsDir
+ svn co ${svnBase}/${svnTags}/$ver
+ cd $ver
+ echo "tag() function run ok!"
+}
+
+build()
+{
+ mvn clean deploy -Dmaven.test.skip.exec=True -PDocs
+ echo "build() function run ok!"
+}
+
+checkIntoRepo()
+{
+ cd $localMvn
+ svn add $ver
+ svn ci -m "JBoss Cache Release Script: Release $ver" $ver
+ echo "checkIntoRepo function run ok!"
+}
+
+docs()
+{
+ cd $docsDir
+ mkdir tempDocs
+ cd tempDocs
+ unzip -a $localMvn/$ver/jbosscache-searchable-$ver-doc.zip
+ mv jbosscache-searchable-$ver/doc ../$ver
+ cd ..
+ rm -rf tmpDocs
+ svn add $ver
+ svn ci -m "JBoss Cache Searchable Release Script: Docs for version $ver" $ver
+ echo "docs() function run ok!"
+
+}
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+# Script
+
+ver=${1}
+echo "This is the JBoss Cache Searchable release script"
+validate
+tag
+build
+checkIntoRepo
+docs
+echo 'Done!'
+echo 'Update
www.jboss.org about new release'
+echo 'Update wiki'
+echo 'Update blog'
+echo
+
+
Property changes on: searchable/trunk/release.sh
___________________________________________________________________
Name: svn:executable
+ *