[Mapbender-commits] r4059 - trunk/build

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Jun 19 11:15:58 EDT 2009


Author: christoph
Date: 2009-06-19 11:15:58 -0400 (Fri, 19 Jun 2009)
New Revision: 4059

Modified:
   trunk/build/build.sh
Log:


Modified: trunk/build/build.sh
===================================================================
--- trunk/build/build.sh	2009-06-19 14:57:11 UTC (rev 4058)
+++ trunk/build/build.sh	2009-06-19 15:15:58 UTC (rev 4059)
@@ -5,7 +5,6 @@
 # 
 #      https://svn.osgeo.org/mapbender/branches, for example 2.4.5
 # $2 - the SVN username for https://svn.osgeo.org/mapbender
-# $3 - the SVN password for https://svn.osgeo.org/mapbender
 
 #
 #set constants
@@ -16,22 +15,22 @@
 FOLDER="build_$TODAY"
 
 # URL to version that is being built
-SVN_URL="https://svn.osgeo.org/mapbender/branches"
+SVN_URL="https://svn.osgeo.org/mapbender"
 
 # path to jsdoc.pl
-JSDOC_PATH="JSDoc"
+#JSDOC_PATH="JSDoc"
 
 # path to "javascript" folder in Mapbender
-JS_PATH="http/javascripts"
+#JS_PATH="http/javascripts"
 
 # path to "extension" folder in Mapbender
-EXT_PATH="http/extensions"
+#EXT_PATH="http/extensions"
 
 # string containing javascript files for JSDoc
-JSDOC_F="$JS_PATH/geometry.js $JS_PATH/point.js $JS_PATH/map.js $JS_PATH/map_obj.js $EXT_PATH/wz_jsgraphics.js"
+#JSDOC_F="$JS_PATH/geometry.js $JS_PATH/point.js $JS_PATH/map.js $JS_PATH/map_obj.js $EXT_PATH/wz_jsgraphics.js"
 
 # array of javascript files for JSMin
-JSMIN_F=("$JS_PATH/geometry.js" "$JS_PATH/point.js" "$JS_PATH/map.js" "$JS_PATH/map_obj.js" "$EXT_PATH/jquery.js" "$EXT_PATH/wz_jsgraphics.js")
+#JSMIN_F=("$JS_PATH/core.js" "$JS_PATH/event.js" "$JS_PATH/jsTree.js" "$JS_PATH/mod_box1.js" "$JS_PATH/mod_displayObj.js" "$JS_PATH/popup.js" "$JS_PATH/mod_addWMSgeneralFunctions.js" "$JS_PATH/geometry.js" "$JS_PATH/point.js" "$JS_PATH/map.js" "$JS_PATH/map_obj.js" "$EXT_PATH/jquery.js" "$EXT_PATH/wz_jsgraphics.js")
 
 
 # ------------------------
@@ -40,62 +39,105 @@
 #
 # ------------------------
 
+
+# ask if tag shall be created
+echo "Do you also want to create a tag for this version (yes/no)?"
+read createTag
+
+if test $createTag = "yes"
+then
+	# ask for SVN password
+	echo "In this case, please enter the SVN password for user $2"
+	stty -echo
+	read password
+	stty echo
+	echo ""
+fi
+
 echo "Building Mapbender $1 ... let's see if this works ..."
 
 # create folder for build
 mkdir $FOLDER 2>/dev/null
 
 #check out from SVN
-echo "checking out from $SVN_URL/$1 ..."
-svn co -q $SVN_URL/$1 $FOLDER/
+echo "checking out from $SVN_URL/branches/$1 ..."
+svn co -q $SVN_URL/branches/$1 $FOLDER/
 
 #compile JSDoc
-echo "compiling JSDoc ..."
-perl $JSDOC_PATH/jsdoc.pl $FOLDER/$JSDOC_F
+#echo "compiling JSDoc ..."
+#perl $JSDOC_PATH/jsdoc.pl $FOLDER/$JSDOC_F
 
 #move JSDoc to folder
-mkdir $FOLDER/documents 2>/dev/null
-mkdir $FOLDER/documents/jsdoc 2>/dev/null
-mv js_docs_out/* $FOLDER/documents/jsdoc/ 2>/dev/null
-rm -rf js_docs_out 2>/dev/null
+#mkdir $FOLDER/documents 2>/dev/null
+#mkdir $FOLDER/documents/jsdoc 2>/dev/null
+#mv js_docs_out/* $FOLDER/documents/jsdoc/ 2>/dev/null
+#rm -rf js_docs_out 2>/dev/null
 
 #check in JSDOC
-echo "committing JSDoc ..."
-svn add -q $FOLDER/documents/
+#echo "committing JSDoc ..."
+#svn add -q $FOLDER/documents/
 # set property svn:mime-type text/html for all html files
-for file in `dir -d $FOLDER/documents/jsdoc/*.html`
-do
-	svn propset svn:mime-type text/html $file 2>/dev/null
-done
+#for file in `dir -d $FOLDER/documents/jsdoc/*.html`
+#do
+#	svn propset svn:mime-type text/html $file 2>/dev/null
+#done
+#
+#svn commit -q -m updated_documentation --username $2 --password $3 $FOLDER/documents/
 
-svn commit -q -m updated_documentation --username $2 --password $3 $FOLDER/documents/
-
 #compile PHPDoc
 # (to do)
 
 #check in PHPDoc
 # (to do)
 
+# create a tag for uncompressed files
+if test $createTag = "yes"
+then
+	echo "OK, will now create a tag for uncompressed files..."
+	svn copy -q --username $2 --password $password -m "this is the build script creating a tag for version $1" $FOLDER $SVN_URL/tags/2.5.1rc1
+
+else
+	echo "Skipping tag creation..."
+fi
+
+
 # compress JS files
 echo "compressing JS ..."
-for name in ${JSMIN_F[@]}
+cd $FOLDER 2>/dev/null
+for file in `find -type f -name *.js`
 do
-	echo "minifying $FOLDER/$name ..."
-	ORIG=$name"_orig"
-	mv $FOLDER/$name $FOLDER/$ORIG 2>/dev/null
-	php5 jsmin.php $FOLDER/$ORIG > $FOLDER/$name
-	rm $FOLDER/$ORIG 2>/dev/null
+	echo "minifying $file ..."
+	ORIG=$file"_orig"
+	mv $file $ORIG 2>/dev/null
+	php5 ../jsmin.php $ORIG > $file
+	rm $ORIG 2>/dev/null
 done
+cd .. 2>/dev/null
 
-# remove SVN metadata
+#compute checksums
+echo "computing checksums for update to next version..."
+php5 checksum/build-checksum.php $FOLDER
+for file in `find $FOLDER -type f -name checksum.json`
+do
+	svn add -q $file
+done
+
+# create a tag for compressed files
+#if test $createTag = "yes"
+#then
+#	echo "OK, will now create a tag for minified files..."
+#	svn copy -q --username $2 -m "this is the build script creating a tag for version $1 (minified, checksums)" $FOLDER $SVN_URL/tags/$1_min
+#else
+#	echo "Skipping tag creation..."
+#fi
+
+
+# remove SVN metadata and obsolete tools folder
 echo "deleting SVN metadata ..."
 cd $FOLDER 2>/dev/null
 rm -rf `find . -type d -name .svn` 2>/dev/null
 cd .. 2>/dev/null
 
-# move tools folder out of http
-echo "moving folder 'tools'..." 
-mv $FOLDER/http/tools $FOLDER/
 
 # rename folder
 mv $FOLDER mapbender_$1
@@ -106,4 +148,4 @@
 zip -rq $ZIP_FILENAME mapbender_$1/*
 
 # remove build folder
-rm -rf mapbender_$1 2>/dev/null
+rm -rf mapbender_$1 2>/dev/null
\ No newline at end of file



More information about the Mapbender_commits mailing list