Source

jackpot30 / hudson / trunk

#!/bin/bash -x
prepare_platform() {
if [ "$TRUNK_URL" == "" ] ; then
    TRUNK_URL="http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc";
fi;

TRUNK_ID=`wget -q $TRUNK_URL/lastSuccessfulBuild/buildNumber -O -`

mkdir -p nbbuild

cd nbbuild
rm -rf netbeans
mkdir netbeans
mkdir -p download

rm `ls download/netbeans-hudson-trunk* | grep -v $TRUNK_ID`

cd netbeans

download_and_unpack_cluster() {
    if [ ! -e ../download/netbeans-hudson-trunk-$TRUNK_ID-$1.zip ] ; then
        wget -q -N $TRUNK_URL/$TRUNK_ID/artifact/nbbuild/dist/hudson-nbms-and-javadoc-$TRUNK_ID-$1.zip -O ../download/netbeans-hudson-trunk-$TRUNK_ID-$1.zip || exit
    fi;
    unzip -q ../download/*$TRUNK_ID-$1.zip || exit
}

for cluster in ide platform java harness nb apisupport enterprise cnd dlight websvccommon; do
    download_and_unpack_cluster $cluster;
done

cd ../..

PLATFORM=$PWD/nbbuild/netbeans

ant -f hudson/download-extra-nbms.xml -Dnbplatform.default.harness.dir=$PLATFORM/harness -Dnbplatform.default.netbeans.dest.dir=$PLATFORM
}

if [ "$PLATFORM" == "" ] ; then
    prepare_platform
fi;

ant -Dnbplatform.active.dir=$PLATFORM -f lib/download.xml download copy-from-platform

SUBPROJECTS="remoting language duplicates cmdline";

for subproject in $SUBPROJECTS; do
    (cd $subproject; ./build.sh -Dnbplatform.default.harness.dir=$PLATFORM/harness -Dnbplatform.default.netbeans.dest.dir=$PLATFORM -Dnbplatform.active.dir=$PLATFORM) || exit 1
done

for subproject in $SUBPROJECTS; do
    if [ -x $subproject/post-build.sh ] ; then
        (cd $subproject; ./post-build.sh -Dnbplatform.default.harness.dir=$PLATFORM/harness -Dnbplatform.default.netbeans.dest.dir=$PLATFORM -Dnbplatform.active.dir=$PLATFORM) || exit 1
    fi;
done

mkdir -p build/updates

NBMS_SUBPROJECTS="remoting language duplicates";

cp `find $NBMS_SUBPROJECTS -type f -name "*.nbm"` build/updates
ant -Dnbplatform.default.harness.dir=$PLATFORM/harness -Dnbplatform.default.netbeans.dest.dir=$PLATFORM -Dnbplatform.active.dir=$PLATFORM -Ddist.base=$DIST_BASE build-auc || exit 1
gzip <build/updates/updates.xml >build/updates/updates.xml.gz

JACKPOT_ANALYSIS_SUBPROJECTS="remoting/common remoting/ide remoting/server/indexer duplicates/ide cmdline language/ide"
JACKPOT_TOOL=`pwd`/cmdline/tool/build/jackpot
echo "$JACKPOT_TOOL"
for subproject in $JACKPOT_ANALYSIS_SUBPROJECTS; do
    (cd $subproject; ant -Dnbplatform.default.harness.dir=$PLATFORM/harness -Dnbplatform.default.netbeans.dest.dir=$PLATFORM -Dnbplatform.active.dir=$PLATFORM -Djackpot.home="$JACKPOT_TOOL" jackpot) || exit 1
done

exit 0
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.