From beed95f71d5297ad7d339457e91414cf8967e8c0 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 23 Sep 2011 18:38:16 +0200 Subject: Assume proper files in delivered 7z and extract _all_ contents, no more submodule naming required. Solves mising atomic files --- jenkins-builds/funcs_promotion.sh | 65 +++++++-------------------------- jenkins-builds/promote-latest-builds.sh | 9 ++--- 2 files changed, 17 insertions(+), 57 deletions(-) diff --git a/jenkins-builds/funcs_promotion.sh b/jenkins-builds/funcs_promotion.sh index 94fc023..72e5d3e 100755 --- a/jenkins-builds/funcs_promotion.sh +++ b/jenkins-builds/funcs_promotion.sh @@ -119,11 +119,10 @@ function prom_merge_modules() { # #1 module name, IE gluegen, jogl, jocl or joal # #2 source folder of artifacts # #3 destination folder of artifacts -# #4-n submodule name within the 7z files # # Example: -# promote_files gluegen /builds/gluegen-b33 tmp-archive gluegen -# promote_files jogl /builds/jogl-b211 tmp-archive nativewindow jogl newt +# promote_files gluegen /builds/gluegen-b33 tmp-archive +# promote_files jogl /builds/jogl-b211 tmp-archive # function prom_promote_module() { local module=$1 @@ -131,12 +130,10 @@ function prom_promote_module() { local sourcedir=$1 shift local destdir=$1 - shift - local submodules=$* local lthisdir=`pwd` - echo "INFO: Promoting files: $module, submodules <$submodules>, from $sourcedir" + echo "INFO: Promoting files: $module, from $sourcedir" # copy the platform 7z files cp -a $sourcedir/artifact.properties $destdir/log/$module.artifact.properties cd $destdir @@ -165,59 +162,23 @@ function prom_promote_module() { # 7z folder verfified above already local zfile=archive/jogamp-$i/$module-$i.7z local zfolder=tmp/`basename $zfile .7z` - for sub in $submodules ; do - local jars=`find $zfolder/jar -maxdepth 1 -name $sub\*$i.jar` - if [ -z "$jars" ] ; then - echo "ERROR: No platform JAR file for module $module, sub $sub, platform $i, sdir $sourcedir" - exit 1 - fi - for j in $jars ; do - cp -av $j ./jar/ - done - if [ -e $zfolder/jar/atomic ] ; then - local jars=`find $zfolder/jar/atomic -maxdepth 1 -name $sub\*$i.jar` - if [ -z "$jars" ] ; then - echo "ERROR: No platform JAR file (atomic) for module $module, sub $sub, platform $i, sdir $sourcedir" - exit 1 - fi - for j in $jars ; do - cp -av $j ./jar/atomic/ - done - fi + for j in $zfolder/jar/*.jar ; do + cp -av $j ./jar/ done + if [ -e $zfolder/jar/atomic ] ; then + for j in $zfolder/jar/atomic/*.jar ; do + cp -av $j ./jar/atomic/ + done + fi done # copy the master pic JAR files # 7z folder verfified above already local zfile=archive/jogamp-$masterpick/$module-$masterpick.7z local zfolder=tmp/`basename $zfile .7z` - for sub in $submodules ; do - local jars=`find $zfolder/jar -maxdepth 1 -name $sub\*$masterpick.jar` - if [ -z "$jars" ] ; then - echo "ERROR: No platform JAR file for module $module, sub $sub, masterpick platform $masterpick, sdir $sourcedir" - exit 1 - fi + for j in $zfolder/jar/*.jar ; do + cp -av $j ./jar/ if [ -e $zfolder/jar/atomic ] ; then - local jars=`find $zfolder/jar/atomic -maxdepth 1 -name $sub\*$masterpick.jar` - if [ -z "$jars" ] ; then - echo "ERROR: No platform JAR file (atomic) for module $module, sub $sub, platform $i, sdir $sourcedir" - exit 1 - fi - fi - local jars=`find $zfolder/jar -maxdepth 1 -name $sub\*.jar` - if [ -z "$jars" ] ; then - echo "ERROR: No JAR files for module $module, sub $sub, masterpick $masterpick, sdir $sourcedir" - exit 1 - fi - for j in $jars ; do - cp -av $j ./jar/ - done - if [ -e $zfolder/jar/atomic ] ; then - local jars=`find $zfolder/jar/atomic -maxdepth 1 -name $sub\*.jar` - if [ -z "$jars" ] ; then - echo "ERROR: No JAR files (atomic) for module $module, sub $sub, masterpick $masterpick, sdir $sourcedir" - exit 1 - fi - for j in $jars ; do + for j in $zfolder/jar/atomic/*.jar ; do cp -av $j ./jar/atomic/ done fi diff --git a/jenkins-builds/promote-latest-builds.sh b/jenkins-builds/promote-latest-builds.sh index 64db25c..1ea46c8 100755 --- a/jenkins-builds/promote-latest-builds.sh +++ b/jenkins-builds/promote-latest-builds.sh @@ -66,7 +66,7 @@ function promote-latest-builds() { echo echo "gluegen.build.number=$bgluegenslave" >> $dest/log/aggregated.artifact.properties - prom_promote_module gluegen $gluegenslave $dest gluegen + prom_promote_module gluegen $gluegenslave $dest cp -a $gluegenmaster/artifact.properties $dest/log/gluegen-master.artifact.properties cp -a $gluegenmaster/javadoc.7z $dest/archive/gluegen-javadoc.7z @@ -87,7 +87,7 @@ function promote-latest-builds() { echo echo "joal.build.number=$bjoalslave" >> $dest/log/aggregated.artifact.properties - prom_promote_module joal $joalslave $dest joal + prom_promote_module joal $joalslave $dest cp -a $joalmaster/artifact.properties $dest/log/joal-master.artifact.properties cp -a $joalmaster/javadoc.7z $dest/archive/joal-javadoc.7z @@ -122,8 +122,7 @@ function promote-latest-builds() { echo echo "jogl.build.number=$bjoglslave" >> $dest/log/aggregated.artifact.properties - # prom_promote_module jogl $joglslave $dest nativewindow jogl newt - prom_promote_module jogl $joglslave $dest jogl + prom_promote_module jogl $joglslave $dest cp -a $joglmaster/artifact.properties $dest/log/jogl-master.artifact.properties cp -a $joglmaster/javadoc.7z $dest/archive/jogl-javadoc.7z @@ -162,7 +161,7 @@ function promote-latest-builds() { echo echo "jocl.build.number=$bjoclslave" >> $dest/log/aggregated.artifact.properties - prom_promote_module jocl $joclslave $dest jocl + prom_promote_module jocl $joclslave $dest cp -a $joclmaster/artifact.properties $dest/log/jocl-master.artifact.properties cp -a $joclmaster/jocl-javadoc.7z $dest/archive/jocl-javadoc.7z -- cgit v1.2.3