[jbosstools-commits] JBoss Tools SVN: r43780 - trunk/build/util/cleanup.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue Sep 18 01:58:19 EDT 2012


Author: nickboldt
Date: 2012-09-18 01:58:19 -0400 (Tue, 18 Sep 2012)
New Revision: 43780

Modified:
   trunk/build/util/cleanup/jbosstools-cleanup.sh
Log:
stop cleaning bottests because we no longer produce them; use for loop instead of 5-6 method calls; parameterize values for numbuildstokeep and threshholdwhendelete so we can call this script from within publish/publish.sh (JBIDE-8667)

Modified: trunk/build/util/cleanup/jbosstools-cleanup.sh
===================================================================
--- trunk/build/util/cleanup/jbosstools-cleanup.sh	2012-09-18 05:58:11 UTC (rev 43779)
+++ trunk/build/util/cleanup/jbosstools-cleanup.sh	2012-09-18 05:58:19 UTC (rev 43780)
@@ -10,6 +10,10 @@
 echo "Logfile: $log" | tee -a $log
 echo "" | tee -a $log
 
+#commandline options so we can call this by itself using `jbosstools-cleanup.sh 1 2` or call it from within publish.sh using `jbosstools-cleanup.sh 5 5`
+if [[ $1 ]] && [[ $1 -gt 0 ]]; then numbuildstokeep=$1; else numbuildstokeep=1; fi # number of builds to keep per branch
+if [[ $2 ]] && [[ $2 -gt 0 ]]; then threshholdwhendelete=$2; else threshholdwhendelete=2; fi # age at which a build is available for delete
+
 getSubDirs () 
 {
 	getSubDirsReturn="";
@@ -147,9 +151,7 @@
 " >> ${fileName}
 }
 
-clean nightly/core 1 2
-clean nightly/coretests 1 2
-clean nightly/soa-tooling 1 2
-clean nightly/soatests 1 2
-clean nightly/webtools 1 2
-clean nightly/bottests 1 2
+# now that we have all the methods and vars defined, let's do some cleaning!
+for dir in nightly/core nightly/coretests nightly/soa-tooling nightly/soatests nightly/webtools; do
+	clean $dir $numbuildstokeep $threshholdwhendelete
+done



More information about the jbosstools-commits mailing list