2006-07-26 11:35:13 +00:00
|
|
|
#!/bin/sh
|
2006-09-20 11:53:43 +00:00
|
|
|
#*******************************************************************************
|
2009-05-26 11:48:55 +00:00
|
|
|
# Copyright (c) 2006, 2009 Wind River Systems, Inc.
|
2006-09-20 11:53:43 +00:00
|
|
|
# All rights reserved. This program and the accompanying materials
|
|
|
|
# are made available under the terms of the Eclipse Public License v1.0
|
|
|
|
# which accompanies this distribution, and is available at
|
|
|
|
# http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
#
|
|
|
|
# Contributors:
|
|
|
|
# Martin Oberhuber - initial API and implementation
|
|
|
|
#*******************************************************************************
|
2006-07-26 11:35:13 +00:00
|
|
|
# Convert normal "site.xml" to "testUpdates"
|
2006-07-26 11:40:30 +00:00
|
|
|
#
|
|
|
|
# Prerequisites:
|
2007-01-17 17:51:31 +00:00
|
|
|
# - Eclipse 3.3Mx installed in $HOME/ws2/eclipse
|
2007-03-01 10:54:08 +00:00
|
|
|
# - Java5 in the PATH or in /shared/dsdp/tm/ibm-java2-ppc64-50
|
2006-07-26 11:35:13 +00:00
|
|
|
|
|
|
|
curdir=`pwd`
|
|
|
|
cd `dirname $0`
|
|
|
|
mydir=`pwd`
|
|
|
|
|
2006-12-12 17:53:07 +00:00
|
|
|
umask 022
|
2006-07-26 11:35:13 +00:00
|
|
|
|
2006-08-18 09:29:56 +00:00
|
|
|
#Use Java5 on build.eclipse.org - need JRE for pack200
|
2007-03-01 10:54:08 +00:00
|
|
|
export PATH=/shared/dsdp/tm/ibm-java2-ppc64-50/jre/bin:/shared/dsdp/tm/ibm-java2-ppc64-50/bin:$PATH
|
2007-02-28 10:06:37 +00:00
|
|
|
basebuilder=${HOME}/ws2/org.eclipse.releng.basebuilder
|
2006-08-18 08:39:12 +00:00
|
|
|
|
2006-07-26 11:35:13 +00:00
|
|
|
# patch site.xml
|
|
|
|
cd ..
|
2006-07-26 11:51:48 +00:00
|
|
|
SITE=`pwd`
|
2006-11-07 14:34:53 +00:00
|
|
|
if [ -f index.html.new ]; then
|
|
|
|
rm -f index.html.new
|
|
|
|
fi
|
2006-08-18 09:17:09 +00:00
|
|
|
if [ -f site.xml.new ]; then
|
|
|
|
rm -f site.xml.new
|
|
|
|
fi
|
|
|
|
if [ -f web/site.xsl.new ]; then
|
|
|
|
rm -f web/site.xsl.new
|
|
|
|
fi
|
|
|
|
|
|
|
|
# get newest plugins and features: to be done manually on real update site
|
2008-09-17 00:13:40 +00:00
|
|
|
TPVERSION="Target Management"
|
2007-07-06 15:56:18 +00:00
|
|
|
TYPE=none
|
2008-09-17 00:13:40 +00:00
|
|
|
SITEDIR=`basename ${SITE}`
|
|
|
|
case ${SITEDIR} in
|
|
|
|
test*Updates) TYPE=test ;;
|
|
|
|
signed*Updates) TYPE=testSigned ;;
|
|
|
|
*milestones) TYPE=milestone ;;
|
|
|
|
*interim) TYPE=interim ;;
|
|
|
|
*) TYPE=unknown ;;
|
|
|
|
esac
|
|
|
|
if [ ${TYPE} = test ]; then
|
2006-07-26 11:51:48 +00:00
|
|
|
echo "Working on test update site"
|
2009-06-26 14:13:52 +00:00
|
|
|
TPTYPE="3.1.1 Test"
|
2008-09-17 00:13:40 +00:00
|
|
|
TPVERSION="${TPVERSION} ${TPTYPE}"
|
2007-01-17 17:51:31 +00:00
|
|
|
REL=`ls $HOME/ws2/working/package | sort | tail -1`
|
2006-08-11 16:08:06 +00:00
|
|
|
if [ "$REL" != "" ]; then
|
2006-08-11 16:24:11 +00:00
|
|
|
echo "Checking new Updates from $REL"
|
2007-01-17 17:51:31 +00:00
|
|
|
DIR="$HOME/ws2/working/package/$REL/updates"
|
2006-08-11 16:08:06 +00:00
|
|
|
if [ -d "$DIR/features" ]; then
|
|
|
|
echo "Copying new plugins and features from $DIR"
|
|
|
|
rm -rf features
|
|
|
|
rm -rf plugins
|
|
|
|
cp -R $DIR/features .
|
|
|
|
cp -R $DIR/plugins .
|
|
|
|
fi
|
|
|
|
fi
|
2009-02-01 18:52:47 +00:00
|
|
|
# CHECK VERSION CORRECTNESS for MICRO UPDATES only
|
|
|
|
# Minor/major version updates are not allowed.
|
|
|
|
# Update of "qualifier" requires also updating "micro"
|
|
|
|
echo "VERIFYING VERSION CORRECTNESS: Features"
|
|
|
|
ls features/*.jar | sed -e 's,^.*features/,,' | sort > f1.$$.txt
|
|
|
|
ls ../updates/3.0/features/*.jar | sed -e 's,^.*features/,,' | sort > f2.$$.txt
|
|
|
|
diff f2.$$.txt f1.$$.txt | grep '^[>]' \
|
|
|
|
| sed -e 's,[>] \(.*_[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)\..*,\1,' > f_new.txt
|
|
|
|
for f in `cat f_new.txt`; do
|
|
|
|
fold=`grep ${f} f2.$$.txt`
|
|
|
|
if [ "${fold}" != "" ]; then
|
|
|
|
echo "PROBLEM: QUALIFIER update without MICRO: ${f}"
|
|
|
|
fi
|
|
|
|
fbase=`echo $f | sed -e 's,\(.*_[0-9][0-9]*\.[0-9][0-9]*\)\..*,\1,'`
|
|
|
|
fold=`grep ${fbase} f2.$$.txt`
|
|
|
|
if [ "${fold}" = "" ]; then
|
|
|
|
echo "PROBLEM: MAJOR or MINOR update : ${f}"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
echo "VERIFYING VERSION CORRECTNESS: Plugins"
|
|
|
|
ls plugins/*.jar | sed -e 's,^.*plugins/,,' | sort > p1.$$.txt
|
|
|
|
ls ../updates/3.0/plugins/*.jar | sed -e 's,^.*plugins/,,' | sort > p2.$$.txt
|
|
|
|
diff p2.$$.txt p1.$$.txt | grep '^[>]' \
|
|
|
|
| sed -e 's,[>] \(.*_[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)\..*,\1,' > p_new.txt
|
|
|
|
for p in `cat p_new.txt`; do
|
|
|
|
pold=`grep ${p} p2.$$.txt`
|
|
|
|
if [ "${pold}" != "" ]; then
|
|
|
|
echo "PROBLEM: QUALIFIER update without MICRO: ${p}"
|
|
|
|
fi
|
|
|
|
pbase=`echo $p | sed -e 's,\(.*_[0-9][0-9]*\.[0-9][0-9]*\)\..*,\1,'`
|
|
|
|
pold=`grep ${pbase} p2.$$.txt`
|
|
|
|
if [ "${pold}" = "" ]; then
|
|
|
|
echo "PROBLEM: MAJOR or MINOR update : ${p}"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
#rm f_new.txt p_new.txt
|
|
|
|
mv -f f1.$$.txt fversions.txt
|
|
|
|
mv -f p1.$$.txt pversions.txt
|
|
|
|
mv -f f2.$$.txt f30versions.txt
|
|
|
|
mv -f p2.$$.txt p30versions.txt
|
|
|
|
## rm f1.$$.txt f2.$$.txt p1.$$.txt p2.$$.txt
|
2006-11-07 14:34:53 +00:00
|
|
|
rm index.html site.xml web/site.xsl
|
|
|
|
cvs -q update -dPR
|
2008-09-17 00:13:40 +00:00
|
|
|
sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/${SITEDIR},g" \
|
|
|
|
-e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
2006-11-07 14:34:53 +00:00
|
|
|
index.html > index.html.new
|
|
|
|
mv -f index.html.new index.html
|
2008-09-17 00:13:40 +00:00
|
|
|
sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/${SITEDIR},g" \
|
|
|
|
-e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
2008-04-18 19:30:25 +00:00
|
|
|
-e '/<!-- BEGIN_2_0 -->/,/<!-- END_2_0_4 -->/d' \
|
2009-06-26 14:13:52 +00:00
|
|
|
-e '/<!-- BEGIN_3_0 -->/,/<!-- END_3_1 -->/d' \
|
2006-07-26 11:51:48 +00:00
|
|
|
site.xml > site.xml.new
|
|
|
|
mv -f site.xml.new site.xml
|
2008-09-17 00:13:40 +00:00
|
|
|
sed -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
2006-07-26 13:17:44 +00:00
|
|
|
web/site.xsl > web/site.xsl.new
|
|
|
|
mv -f web/site.xsl.new web/site.xsl
|
2006-11-17 21:18:37 +00:00
|
|
|
echo "Conditioning the site... $SITE"
|
|
|
|
#java -Dorg.eclipse.update.jarprocessor.pack200=$mydir \
|
2007-02-28 10:06:37 +00:00
|
|
|
#java -jar $HOME/ws2/eclipse/startup.jar \
|
2007-02-27 22:05:43 +00:00
|
|
|
java \
|
2007-02-28 10:06:37 +00:00
|
|
|
-jar ${basebuilder}/plugins/org.eclipse.equinox.launcher.jar \
|
2007-02-27 22:05:43 +00:00
|
|
|
-application org.eclipse.update.core.siteOptimizer \
|
|
|
|
-jarProcessor -outputDir $SITE \
|
|
|
|
-processAll -repack $SITE
|
|
|
|
#java -Dorg.eclipse.update.jarprocessor.pack200=$mydir \
|
|
|
|
# $HOME/ws2/jarprocessor/jarprocessor.jar \
|
|
|
|
# -outputDir $SITE -processAll -repack $SITE
|
2008-09-17 00:13:40 +00:00
|
|
|
elif [ ${TYPE} = testSigned ]; then
|
2006-11-07 14:34:53 +00:00
|
|
|
echo "Working on signed update site"
|
2009-06-26 14:13:52 +00:00
|
|
|
TPTYPE="3.1.1 Signed Test"
|
2008-09-17 00:13:40 +00:00
|
|
|
TPVERSION="${TPVERSION} ${TPTYPE}"
|
2006-11-17 21:18:37 +00:00
|
|
|
echo "Signing jars from test update site (expecting conditioned jars)..."
|
2006-11-03 18:20:48 +00:00
|
|
|
STAGING=/home/data/httpd/download-staging.priv/dsdp/tm
|
|
|
|
stamp=`date +'%Y%m%d-%H%M'`
|
|
|
|
if [ -d ${STAGING} -a -d ${SITE}/../testUpdates ]; then
|
|
|
|
#get jars from testUpdates, sign them and put them here
|
|
|
|
mkdir ${SITE}/features.${stamp}
|
|
|
|
mkdir -p ${STAGING}/updates.${stamp}/features
|
|
|
|
cp -R ${SITE}/../testUpdates/features/*.jar ${STAGING}/updates.${stamp}/features
|
|
|
|
cd ${STAGING}/updates.${stamp}/features
|
|
|
|
for x in `ls *.jar`; do
|
2008-11-11 17:53:34 +00:00
|
|
|
result=`jarsigner -verify ${x} | head -1`
|
|
|
|
if [ "$result" != "jar verified." ]; then
|
|
|
|
# do not sign Orbit bundles again since they are signed already
|
|
|
|
echo "signing feature: ${x}"
|
|
|
|
sign ${x} nomail >/dev/null
|
|
|
|
fi
|
2006-11-03 18:20:48 +00:00
|
|
|
done
|
|
|
|
TRIES=10
|
|
|
|
while [ $TRIES -gt 0 ]; do
|
|
|
|
sleep 30
|
|
|
|
echo "TRIES to go: ${TRIES}"
|
|
|
|
for x in `ls *.jar | grep -v '^temp[_.]'`; do
|
2008-11-11 17:08:10 +00:00
|
|
|
result=`jarsigner -verify ${x} | head -1`
|
2006-11-03 18:20:48 +00:00
|
|
|
if [ "$result" = "jar verified." ]; then
|
|
|
|
echo "${result}: ${x}"
|
|
|
|
cp ${x} ${SITE}/features.${stamp}
|
|
|
|
rm ${x}
|
|
|
|
else
|
|
|
|
echo "-pending- ${x} : ${result}" | head -1
|
|
|
|
sleep 30
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
FILES=`ls 2>/dev/null`
|
|
|
|
if [ "$FILES" = "" ]; then
|
|
|
|
TRIES=0
|
|
|
|
ok=1
|
|
|
|
else
|
|
|
|
echo "--> FILES is $FILES"
|
|
|
|
TRIES=`expr $TRIES - 1`
|
|
|
|
ok=0
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ "$ok" = "1" ]; then
|
|
|
|
rmdir ${STAGING}/updates.${stamp}/features
|
|
|
|
mkdir ${SITE}/plugins.${stamp}
|
|
|
|
mkdir -p ${STAGING}/updates.${stamp}/plugins
|
|
|
|
cp ${SITE}/../testUpdates/plugins/*.jar ${STAGING}/updates.${stamp}/plugins
|
|
|
|
cd ${STAGING}/updates.${stamp}/plugins
|
|
|
|
for x in `ls *.jar`; do
|
2008-11-11 17:53:34 +00:00
|
|
|
result=`jarsigner -verify ${x} | head -1`
|
|
|
|
if [ "$result" != "jar verified." ]; then
|
|
|
|
# do not sign Orbit bundles again since they are signed already
|
|
|
|
echo "signing plugin: ${x}"
|
|
|
|
sign ${x} nomail >/dev/null
|
|
|
|
fi
|
2006-11-03 18:20:48 +00:00
|
|
|
done
|
|
|
|
TRIES=10
|
|
|
|
while [ $TRIES -gt 0 ]; do
|
|
|
|
sleep 30
|
|
|
|
echo "TRIES to go: ${TRIES}"
|
|
|
|
for x in `ls *.jar | grep -v '^temp[_.]'`; do
|
2008-11-11 17:08:10 +00:00
|
|
|
result=`jarsigner -verify ${x} | head -1`
|
2006-11-03 18:20:48 +00:00
|
|
|
if [ "$result" = "jar verified." ]; then
|
|
|
|
echo "${result}: ${x}"
|
|
|
|
cp ${x} ${SITE}/plugins.${stamp}
|
|
|
|
rm ${x}
|
|
|
|
else
|
|
|
|
echo "-pending- ${x} : ${result}" | head -1
|
|
|
|
sleep 30
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
FILES=`ls 2>/dev/null`
|
|
|
|
if [ "$FILES" = "" ]; then
|
|
|
|
TRIES=0
|
|
|
|
ok=1
|
|
|
|
else
|
|
|
|
echo "--> FILES is $FILES"
|
|
|
|
TRIES=`expr $TRIES - 1`
|
|
|
|
ok=0
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
if [ "$ok" = "1" ]; then
|
|
|
|
cd ${SITE}
|
|
|
|
rmdir ${STAGING}/updates.${stamp}/plugins
|
|
|
|
rmdir ${STAGING}/updates.${stamp}
|
2006-11-07 14:34:53 +00:00
|
|
|
#mv features features.old.${stamp}
|
|
|
|
#mv plugins plugins.old.${stamp}
|
2008-11-26 15:20:27 +00:00
|
|
|
rm fversions.txt pversions.txt f30versions.txt p30versions.txt f_new.txt p_new.txt 2>/dev/null
|
2006-11-07 14:34:53 +00:00
|
|
|
rm -rf features plugins
|
2006-11-03 18:20:48 +00:00
|
|
|
mv features.${stamp} features
|
|
|
|
mv plugins.${stamp} plugins
|
|
|
|
else
|
|
|
|
echo "Something went wrong during staging and signing."
|
|
|
|
echo "Keeping existing update site intact."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "staging or testUpdates not found:"
|
2006-11-07 14:34:53 +00:00
|
|
|
echo "please fix your pathes"
|
|
|
|
exit 1
|
2006-11-03 18:20:48 +00:00
|
|
|
fi
|
2006-11-07 14:34:53 +00:00
|
|
|
rm index.html site.xml web/site.xsl
|
|
|
|
cvs -q update -dPR
|
2008-09-17 00:13:40 +00:00
|
|
|
sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/${SITEDIR},g" \
|
|
|
|
-e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
2006-11-07 14:34:53 +00:00
|
|
|
index.html > index.html.new
|
|
|
|
mv -f index.html.new index.html
|
2008-09-17 00:13:40 +00:00
|
|
|
sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/${SITEDIR},g" \
|
|
|
|
-e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
2008-04-18 19:30:25 +00:00
|
|
|
-e '/<!-- BEGIN_2_0 -->/,/<!-- END_2_0_4 -->/d' \
|
2009-06-26 14:13:52 +00:00
|
|
|
-e '/<!-- BEGIN_3_0 -->/,/<!-- END_3_1 -->/d' \
|
2006-11-07 14:34:53 +00:00
|
|
|
site.xml > site.xml.new
|
|
|
|
mv -f site.xml.new site.xml
|
2008-09-17 00:13:40 +00:00
|
|
|
sed -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
2006-11-07 14:34:53 +00:00
|
|
|
web/site.xsl > web/site.xsl.new
|
|
|
|
mv -f web/site.xsl.new web/site.xsl
|
2008-09-17 00:13:40 +00:00
|
|
|
elif [ ${TYPE} = milestone ]; then
|
2007-02-02 14:17:01 +00:00
|
|
|
echo "Working on milestone update site"
|
2009-06-26 14:13:52 +00:00
|
|
|
TPTYPE="3.1.1 Milestone"
|
2008-09-17 00:13:40 +00:00
|
|
|
TPVERSION="${TPVERSION} ${TPTYPE}"
|
2006-12-20 18:03:21 +00:00
|
|
|
echo "Expect that you copied your features and plugins yourself"
|
|
|
|
stamp=`date +'%Y%m%d-%H%M'`
|
|
|
|
rm index.html site.xml web/site.xsl
|
|
|
|
cvs -q update -dPR
|
2008-09-17 00:13:40 +00:00
|
|
|
sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
|
|
|
|
-e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
2007-01-02 14:37:09 +00:00
|
|
|
-e '\,</h1>,a\
|
|
|
|
This site contains Target Management Milestones (I-, S- and M- builds) which are \
|
2008-09-17 00:13:40 +00:00
|
|
|
being contributed to the Galileo coordinated release train (Eclipse 3.5.x).' \
|
2006-12-20 18:03:21 +00:00
|
|
|
index.html > index.html.new
|
|
|
|
mv -f index.html.new index.html
|
2008-09-17 00:13:40 +00:00
|
|
|
## keep 3.0.x features in site.xml
|
2008-04-18 19:30:25 +00:00
|
|
|
## -e '/<!-- BEGIN_2_0_1 -->/,/<!-- END_2_0_4 -->/d' \
|
2008-09-17 00:13:40 +00:00
|
|
|
sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
|
|
|
|
-e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
|
|
|
-e '/<!-- BEGIN_2_0 -->/,/<!-- END_2_0_4 -->/d' \
|
2009-06-26 14:13:52 +00:00
|
|
|
-e '/<!-- BEGIN_3_0 -->/,/<!-- END_3_1 -->/d' \
|
2006-12-20 18:03:21 +00:00
|
|
|
site.xml > site.xml.new
|
|
|
|
mv -f site.xml.new site.xml
|
2008-09-17 00:13:40 +00:00
|
|
|
sed -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
2006-12-20 18:03:21 +00:00
|
|
|
web/site.xsl > web/site.xsl.new
|
|
|
|
mv -f web/site.xsl.new web/site.xsl
|
2008-09-17 00:13:40 +00:00
|
|
|
elif [ ${TYPE} = interim ]; then
|
2007-02-05 10:39:18 +00:00
|
|
|
echo "Working on interim update site"
|
2009-06-26 14:13:52 +00:00
|
|
|
TPTYPE="3.1.1 Interim"
|
2008-09-17 00:13:40 +00:00
|
|
|
TPVERSION="${TPVERSION} ${TPTYPE}"
|
2007-02-05 10:39:18 +00:00
|
|
|
echo "Expect that you copied your features and plugins yourself"
|
|
|
|
stamp=`date +'%Y%m%d-%H%M'`
|
|
|
|
rm index.html site.xml web/site.xsl
|
|
|
|
cvs -q update -dPR
|
2008-09-17 00:13:40 +00:00
|
|
|
sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
|
|
|
|
-e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
2007-02-05 10:39:18 +00:00
|
|
|
-e '\,</h1>,a\
|
2008-06-26 16:47:39 +00:00
|
|
|
This site contains Target Management Interim Maintenance builds (I-, S-, and M-builds) in order \
|
2007-02-05 10:39:18 +00:00
|
|
|
to test them before going live.' \
|
|
|
|
index.html > index.html.new
|
|
|
|
mv -f index.html.new index.html
|
2008-02-28 14:34:17 +00:00
|
|
|
## keep 2.0.x features in site.xml
|
2008-04-18 19:30:25 +00:00
|
|
|
## -e '/<!-- BEGIN_2_0_1 -->/,/<!-- END_2_0_4 -->/d' \
|
2008-09-17 00:13:40 +00:00
|
|
|
sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
|
|
|
|
-e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
2009-02-02 02:18:52 +00:00
|
|
|
-e '/<!-- BEGIN_2_0 -->/,/<!-- END_2_0_4 -->/d' \
|
2009-06-26 14:13:52 +00:00
|
|
|
-e '/<!-- BEGIN_3_0 -->/,/<!-- END_3_1 -->/d' \
|
2007-02-05 10:39:18 +00:00
|
|
|
site.xml > site.xml.new
|
|
|
|
mv -f site.xml.new site.xml
|
2008-09-17 00:13:40 +00:00
|
|
|
sed -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
2007-02-05 10:39:18 +00:00
|
|
|
web/site.xsl > web/site.xsl.new
|
|
|
|
mv -f web/site.xsl.new web/site.xsl
|
2009-06-26 14:13:52 +00:00
|
|
|
elif [ `basename $SITE` = 3.0 ]; then
|
|
|
|
echo "Working on 3.0 update site"
|
|
|
|
TPTYPE="3.0"
|
|
|
|
TPVERSION="${TPVERSION} ${TPTYPE}"
|
|
|
|
TYPE=official
|
|
|
|
echo "Expect that you copied your features and plugins yourself"
|
|
|
|
stamp=`date +'%Y%m%d-%H%M'`
|
|
|
|
rm index.html site.xml web/site.xsl
|
|
|
|
cvs -q update -dPR
|
|
|
|
sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
|
|
|
|
-e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
|
|
|
-e '\,</h1>,a\
|
|
|
|
This site contains Target Management 3.0 Releases and Updates (R- builds) which are \
|
|
|
|
being contributed to the Ganymede coordinated release train (Eclipse 3.4).' \
|
|
|
|
index.html > index.html.new
|
|
|
|
mv -f index.html.new index.html
|
|
|
|
## dont keep 2.0.x features in site.xml
|
|
|
|
sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
|
|
|
|
-e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
|
|
|
-e '/<!-- BEGIN_2_0 -->/,/<!-- END_2_0_4 -->/d' \
|
|
|
|
-e '/<!-- BEGIN_3_1_1 -->/,/<!-- END_3_1_1 -->/d' \
|
|
|
|
site.xml > site.xml.new
|
|
|
|
mv -f site.xml.new site.xml
|
|
|
|
rm site.xml.new1 site.xml.new2
|
|
|
|
sed -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
|
|
|
web/site.xsl > web/site.xsl.new
|
|
|
|
mv -f web/site.xsl.new web/site.xsl
|
2008-09-17 00:13:40 +00:00
|
|
|
elif [ `basename $SITE` = 3.1 ]; then
|
|
|
|
echo "Working on 3.1 update site"
|
|
|
|
TPTYPE="3.1"
|
|
|
|
TPVERSION="${TPVERSION} ${TPTYPE}"
|
2008-09-23 14:05:07 +00:00
|
|
|
TYPE=official
|
2007-11-08 13:53:57 +00:00
|
|
|
echo "Expect that you copied your features and plugins yourself"
|
|
|
|
stamp=`date +'%Y%m%d-%H%M'`
|
|
|
|
rm index.html site.xml web/site.xsl
|
|
|
|
cvs -q update -dPR
|
2008-09-17 00:13:40 +00:00
|
|
|
sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
|
|
|
|
-e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
2007-11-08 13:53:57 +00:00
|
|
|
-e '\,</h1>,a\
|
2009-06-26 14:13:52 +00:00
|
|
|
This site contains Target Management 3.1 Releases and Updates (R- builds) which are \
|
2008-09-17 00:13:40 +00:00
|
|
|
being contributed to the Galileo coordinated release train (Eclipse 3.5).' \
|
2007-11-08 13:53:57 +00:00
|
|
|
index.html > index.html.new
|
|
|
|
mv -f index.html.new index.html
|
|
|
|
## dont keep 2.0.x features in site.xml
|
2008-09-17 00:13:40 +00:00
|
|
|
sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
|
|
|
|
-e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
2008-04-18 19:30:25 +00:00
|
|
|
-e '/<!-- BEGIN_2_0 -->/,/<!-- END_2_0_4 -->/d' \
|
2009-06-26 14:13:52 +00:00
|
|
|
-e '/<!-- BEGIN_3_0 -->/,/<!-- END_3_0_3 -->/d' \
|
|
|
|
-e '/<!-- BEGIN_3_1_1 -->/,/<!-- END_3_1_1 -->/d' \
|
|
|
|
site.xml > site.xml.new
|
2007-11-08 13:53:57 +00:00
|
|
|
mv -f site.xml.new site.xml
|
2008-09-23 14:05:07 +00:00
|
|
|
rm site.xml.new1 site.xml.new2
|
2008-09-17 00:13:40 +00:00
|
|
|
sed -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
|
2007-11-08 13:53:57 +00:00
|
|
|
web/site.xsl > web/site.xsl.new
|
|
|
|
mv -f web/site.xsl.new web/site.xsl
|
2006-11-07 14:34:53 +00:00
|
|
|
else
|
|
|
|
echo "Working on official update site"
|
2007-07-06 15:56:18 +00:00
|
|
|
TYPE=official
|
2006-11-07 14:34:53 +00:00
|
|
|
echo "Expect that you copied your features and plugins yourself"
|
|
|
|
stamp=`date +'%Y%m%d-%H%M'`
|
|
|
|
rm index.html site.xml web/site.xsl
|
|
|
|
cvs -q update -dPR
|
2008-04-18 19:30:25 +00:00
|
|
|
sed -e '/<!-- BEGIN_2_0_5 -->/,/<!-- END_2_0_5 -->/d' \
|
2007-09-28 15:15:49 +00:00
|
|
|
site.xml > site.xml.new1
|
2008-09-23 14:05:07 +00:00
|
|
|
sed -e '/<!-- BEGIN_3_0_2 -->/,/<!-- END_3_0_2 -->/d' \
|
2008-06-26 16:47:39 +00:00
|
|
|
site.xml.new1 > site.xml.new2
|
2008-09-23 14:05:07 +00:00
|
|
|
sed -e '/<!-- BEGIN_3_1 -->/,/<!-- END_3_1 -->/d' \
|
2008-06-26 16:47:39 +00:00
|
|
|
site.xml.new2 > site.xml.new
|
2007-07-05 11:14:39 +00:00
|
|
|
mv -f site.xml.new site.xml
|
2008-06-26 16:47:39 +00:00
|
|
|
rm site.xml.new1 site.xml.new2
|
2006-07-26 11:51:48 +00:00
|
|
|
fi
|
2006-09-28 15:28:47 +00:00
|
|
|
FEATURES=`grep 'features/[^ ]*\.qualifier\.jar' site.xml | sed -e 's,^[^"]*"features/\([^0-9]*[0-9][0-9.]*\).*$,\1,g'`
|
2006-08-18 09:17:09 +00:00
|
|
|
for feature in $FEATURES ; do
|
|
|
|
#list newest ones first
|
2006-09-28 15:28:47 +00:00
|
|
|
TAG=`ls -t features/${feature}*.jar | head -1 | sed -e 's,[^0-9]*[0-9][0-9]*\.[0-9]*\.[0-9]*\.\([^.]*\).jar,\1,'`
|
2006-08-18 09:17:09 +00:00
|
|
|
if [ "$TAG" != "" ]; then
|
|
|
|
echo "$feature : $TAG"
|
|
|
|
sed -e "/$feature/s/qualifier/$TAG/g" site.xml > site.xml.new
|
|
|
|
mv -f site.xml.new site.xml
|
|
|
|
fi
|
|
|
|
done
|
2007-02-05 10:39:18 +00:00
|
|
|
#Create Europa version of site.xml
|
|
|
|
if [ -f site-europa.xml ]; then
|
|
|
|
rm -rf site-europa.xml
|
|
|
|
fi
|
|
|
|
sed -e '/!EUROPA_ONLY!/d' site.xml > site-europa.xml
|
2006-07-26 11:35:13 +00:00
|
|
|
|
2007-03-01 11:55:37 +00:00
|
|
|
#Get rid of Europa comments completely in order to avoid SAX exception
|
|
|
|
#in comment when the feature qualifier extends to --
|
|
|
|
awk 'BEGIN {doit=1}
|
|
|
|
/-- !EUROPA_ONLY!/ {doit=0}
|
|
|
|
{ if(doit==1) print; }
|
|
|
|
/!EUROPA_ONLY! --/ {doit=1}' site.xml > site.xml.tmp
|
|
|
|
mv -f site.xml.tmp site.xml
|
|
|
|
|
2006-07-26 11:35:13 +00:00
|
|
|
# optimize the site
|
2008-01-10 14:17:04 +00:00
|
|
|
# see http://wiki.eclipse.org/Platform-releng-faq
|
2007-07-06 15:56:18 +00:00
|
|
|
case ${TYPE} in test*)
|
2007-07-06 15:58:35 +00:00
|
|
|
echo "Packing the site... $SITE"
|
|
|
|
# Workaround for downgrading effort of pack200 to avoid VM bug
|
|
|
|
# See https://bugs.eclipse.org/bugs/show_bug.cgi?id=154069
|
2007-07-06 15:56:18 +00:00
|
|
|
#java -Dorg.eclipse.update.jarprocessor.pack200=$mydir \
|
|
|
|
#java -jar $HOME/ws2/eclipse/startup.jar \
|
|
|
|
java -jar ${basebuilder}/plugins/org.eclipse.equinox.launcher.jar \
|
2007-02-27 22:05:43 +00:00
|
|
|
-application org.eclipse.update.core.siteOptimizer \
|
|
|
|
-jarProcessor -outputDir $SITE \
|
|
|
|
-processAll -pack $SITE
|
2007-07-06 15:56:18 +00:00
|
|
|
#java -Dorg.eclipse.update.jarprocessor.pack200=$mydir \
|
|
|
|
# $HOME/ws2/jarprocessor/jarprocessor.jar \
|
|
|
|
# -outputDir $SITE -processAll -pack $SITE
|
|
|
|
;;
|
|
|
|
esac
|
2006-07-26 11:35:13 +00:00
|
|
|
|
|
|
|
#Create the digest
|
2006-07-26 11:40:30 +00:00
|
|
|
echo "Creating digest..."
|
2007-02-28 10:06:37 +00:00
|
|
|
#java -jar $HOME/ws2/eclipse/startup.jar \
|
|
|
|
java -jar ${basebuilder}/plugins/org.eclipse.equinox.launcher.jar \
|
2006-07-26 11:35:13 +00:00
|
|
|
-application org.eclipse.update.core.siteOptimizer \
|
2006-07-26 11:51:48 +00:00
|
|
|
-digestBuilder -digestOutputDir=$SITE \
|
2007-03-01 11:55:37 +00:00
|
|
|
-siteXML=$SITE/site-europa.xml
|
2006-07-26 11:40:30 +00:00
|
|
|
|
2008-05-21 14:48:08 +00:00
|
|
|
##if false ; then
|
2008-05-20 22:41:28 +00:00
|
|
|
#Create P2 metadata
|
|
|
|
echo "Creating P2 metadata..."
|
2008-05-20 22:43:22 +00:00
|
|
|
#Always create from scratch
|
|
|
|
cd ${SITE}
|
2008-05-21 14:50:09 +00:00
|
|
|
for x in content.xml content.jar content.jar.pack.gz artifacts.xml artifacts.jar artifacts.jar.pack.gz ; do
|
|
|
|
if [ -f $x ]; then rm -f $x; fi
|
|
|
|
done
|
2008-05-20 22:41:28 +00:00
|
|
|
java -jar ${basebuilder}/plugins/org.eclipse.equinox.launcher.jar \
|
|
|
|
-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator \
|
|
|
|
-updateSite ${SITE}/ \
|
|
|
|
-site file:${SITE}/site.xml \
|
|
|
|
-metadataRepository file:${SITE}/ \
|
2008-09-17 00:13:40 +00:00
|
|
|
-metadataRepositoryName "${TPVERSION} Update Site" \
|
2008-05-20 22:41:28 +00:00
|
|
|
-artifactRepository file:${SITE}/ \
|
2008-09-17 00:13:40 +00:00
|
|
|
-artifactRepositoryName "${TPVERSION} Artifacts" \
|
2008-05-20 22:41:28 +00:00
|
|
|
-compress \
|
|
|
|
-reusePack200Files \
|
2008-05-21 13:19:31 +00:00
|
|
|
-noDefaultIUs \
|
2008-05-21 14:48:08 +00:00
|
|
|
-vmargs -Xmx256M
|
|
|
|
##fi
|
2008-05-20 22:41:28 +00:00
|
|
|
|
2006-07-26 11:51:48 +00:00
|
|
|
cd $SITE
|
2007-01-02 14:51:49 +00:00
|
|
|
chgrp -R dsdp-tmadmin .
|
|
|
|
chmod -R g+w .
|
2006-11-03 22:19:09 +00:00
|
|
|
chmod -R a+r .
|
2006-11-03 18:20:48 +00:00
|
|
|
cd $curdir
|