Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Williams2015-03-24 03:40:06 -0400
committerDavid Williams2015-03-24 03:40:06 -0400
commitf1b120221f362a5353efe27fe73a727f86cfd71b (patch)
tree4cf3d7d6f8207e4d6ee7958d6bc4818876abb43a
parent4b65849a3d0212ec401f8ecd5264ca11281bb821 (diff)
downloadeclipse.platform.releng.aggregator-david_williams/promoteBug.tar.gz
eclipse.platform.releng.aggregator-david_williams/promoteBug.tar.xz
eclipse.platform.releng.aggregator-david_williams/promoteBug.zip
Bug 462879 - "Index Only" update of milestone build does not work welldavid_williams/promoteBug
-rwxr-xr-xproduction/sdk/promoteStableRelease/promoteImpl/promoteDropSite.sh15
-rwxr-xr-xproduction/sdk/promoteStableRelease/promoteMars/promoteSites.sh4
-rwxr-xr-xproduction/sdk/renameBuild.sh61
3 files changed, 47 insertions, 33 deletions
diff --git a/production/sdk/promoteStableRelease/promoteImpl/promoteDropSite.sh b/production/sdk/promoteStableRelease/promoteImpl/promoteDropSite.sh
index 3cc85a48..8c6410c1 100755
--- a/production/sdk/promoteStableRelease/promoteImpl/promoteDropSite.sh
+++ b/production/sdk/promoteStableRelease/promoteImpl/promoteDropSite.sh
@@ -36,7 +36,7 @@ then
printf "\n\t%s\n\t%s to \n\t%s\n" "Making backup copy of original ..." "$DROP_ID" "${DROP_ID}ORIG"
if [[ -e ${DROP_ID} ]]
then
- rsync -ra ${DROP_ID}/ ${DROP_ID}ORIG
+ rsync -r ${DROP_ID}/ ${DROP_ID}ORIG
else
echo -e "\n\tERROR: the directory ${DROP_ID} does not exist\n"
exit 1
@@ -60,10 +60,13 @@ else
# just copy over what's there.
# TODO: earlier, we could check to be sure the directory we expect really does exist.
printf "\n\t%s\n" "Making copy (update) of original on top of previous renamed version. "
-
- rsync -rua ${DROP_ID}/ ${DL_DROP_ID}/
-
-
+ if [[ -e ${DROP_ID} ]]
+ then
+ rsync -ru ${DROP_ID}/ ${DL_DROP_ID}/
+ else
+ echo -e "\n\tERROR: the directory ${DROP_ID} does not exist\n"
+ exit 1
+ fi
fi
if [[ ! "${INDEX_ONLY}" == "true" ]]
@@ -77,7 +80,7 @@ fi
if [[ ! "${INDEX_ONLY}" == "true" ]]
then
- printf "\n\t%s\n" "Moving backup copy back to original, since INDEX_ONLY was ${INDEX_ONLY}."
+ printf "\n\t%s\n" "Moving backup copy back to original, since INDEX_ONLY was not defined."
mv ${DROP_ID}ORIG ${DROP_ID}
else
printf "\n\t%s\n" "Nothing to move back to original, since never copied to ORIG, since INDEX_ONLY was ${INDEX_ONLY}"
diff --git a/production/sdk/promoteStableRelease/promoteMars/promoteSites.sh b/production/sdk/promoteStableRelease/promoteMars/promoteSites.sh
index 3f8eaa26..dc34019e 100755
--- a/production/sdk/promoteStableRelease/promoteMars/promoteSites.sh
+++ b/production/sdk/promoteStableRelease/promoteMars/promoteSites.sh
@@ -8,7 +8,7 @@
# Used in name of repositories, tags, as well as names in Equinox.
export TRAIN_NAME=Mars
-* Used in names and labels for Eclipse
+# Used in names and labels for Eclipse
export RELEASE_NUMBER=4.5
# LEAVE MILESTONE blank, present, but undefined if final release
# But for true milestones, define as M1, M2, etc.
@@ -16,7 +16,7 @@ export RELEASE_NUMBER=4.5
MILESTONE=M6
# The site we are promoting FROM (always an I-build, for main stream, always M-build, for maintenance)
-export DROP_ID=I20150320-0800
+export DROP_ID=I20150323-1400
# INDEX_ONLY means that everything has been promoted once already (and, made visible)
# and we merely want to "rename" and "promote" any new unit tests
diff --git a/production/sdk/renameBuild.sh b/production/sdk/renameBuild.sh
index df2927ef..f0ac6858 100755
--- a/production/sdk/renameBuild.sh
+++ b/production/sdk/renameBuild.sh
@@ -9,16 +9,36 @@
# its assumed oldname is old name of directory and buildId, such as I20120503-1800
# newdirname is new name for directory, such as S-3.8M7-201205031800 and
# newlabel is the new "short name" of the deliverables, such as 3.8M7
-oldname=$1
-newdirname=$2
-newlabel=$3
-dirname=$4
-if [[ -z "${dirname}" ]]
+if [[ $# != 3 && $# != 4 ]]
then
- dirname=$oldname
+ # usage:
+ scriptname=$(basename $0)
+ printf "\n\t%s\n" "This script, $scriptname requires three (optionally four) arguments, in order: "
+ printf "\t\t%s\t%s\n" "oldname" "(e.g. I20120503-1800) "
+ printf "\t\t%s\t%s\n" "newdirname" "(e.g. S-3.8M7-201205031800) "
+ printf "\t\t%s\t%s\n" "newlabel" "(e.g. 3.8M7 or 4.2M7 or KeplerM3) "
+ printf "\t\t%s\t%s\n" "dirname" "Optional, this is used when the rename should be done on a directory other than 'oldName', such as for INDEX_ONLY update."
+ printf "\t%s\n" "for example,"
+ printf "\t%s\n\n" "./$scriptname I20120503-1800 S-3.8M7-201205031800 3.8M7 [S-3.8M7-201205031800]"
+ exit 1
+else
+ oldname=$1
+ newdirname=$2
+ newlabel=$3
+ dirname=$4
+ if [[ -z "${dirname}" ]]
+ then
+ dirname=$oldname
+ fi
+ printf "\n\tInput to renameBuild.sh:\n"
+ printf "\t\toldname: ${oldname}\n"
+ printf "\t\tnewdirname: ${newdirname}\n"
+ printf "\t\tnewlabel: ${newlabel}\n"
+ printf "\t\tdirname: ${dirname}\n\n\n"
fi
+
function renamefile ()
{
# file name is input parameter
@@ -36,28 +56,17 @@ function renamefile ()
fi
}
-if [[ $# != 3 | $# != 4 ]]
-then
- # usage:
- scriptname=$(basename $0)
- printf "\n\t%s\n" "This script, $scriptname requires three (optionally four) arguments, in order: "
- printf "\t\t%s\t%s\n" "oldname" "(e.g. I20120503-1800) "
- printf "\t\t%s\t%s\n" "newdirname" "(e.g. S-3.8M7-201205031800) "
- printf "\t\t%s\t%s\n" "newlabel" "(e.g. 3.8M7 or 4.2M7 or KeplerM3) "
- printf "\t\t%s\t%s\n" "dirname" "Optional, this is used when the rename should be done on a directory other than 'oldName', such as for INDEX_ONLY update."
- printf "\t%s\n" "for example,"
- printf "\t%s\n\n" "./$scriptname I20120503-1800 S-3.8M7-201205031800 3.8M7 [S-3.8M7-201205031800]"
- exit 1
-fi
+
if [[ "${oldname}" == "${dirname}" ]]
then
echo "Renaming build $oldname to $newdirname with $newlabel"
else
- echo "Renaming build $oldname to $newdirname with $newlabel but working in directory $dirname"
+ echo "Renaming build $oldname to $newdirname with $newlabel but working in directory ${dirname}"
fi
-#be sure to do "long string" first, since "sort string" will also
+
+# be sure to do "long string" first, since "sort string" will also
# match it.
-#https://bugs.eclipse.org/bugs/show_bug.cgi?id=435671#7
+# https://bugs.eclipse.org/bugs/show_bug.cgi?id=435671#7
# specific "replaces" to make sure checksums URLs are correct for equinox
fromString="EQ_BUILD_DIR_SEG = \"${oldname}\""
@@ -206,7 +215,7 @@ echo -e "\n\tReplacing ${oldString} with ${newString} in ${dirname}/buildpropert
replaceBuildNameCommand="s!${oldString}!${newString}!g"
# quotes are critical here, since strings might contain spaces!
-perl -w -pi -e "${replaceBuildNameCommand}" ${dirame}/buildproperties.php
+perl -w -pi -e "${replaceBuildNameCommand}" ${dirname}/buildproperties.php
# One special case for promoted builds, is the "FAILED" icons are
# changed to "OK", since all unit tests accounted for, if not fixed.
@@ -216,13 +225,15 @@ replaceBuildNameCommand="s!${oldString}!${newString}!g"
# quotes are critical here, since strings might contain spaces!
perl -w -pi -e "${replaceBuildNameCommand}" ${dirname}/index.php
-if [[ ! "${oldname}" == "${newdirname}" ]]
+# If the names are equal, then we must be doing an "index only" update, and no need to
+# to 'move'
+if [[ ! "${dirname}" == "${newdirname}" ]]
then
echo -e "\n\n\tMove old directory, $oldname, to new directory, $newdirname.\n\n"
# move directory before file renames
mv $oldname $newdirname
fi
-# We (currently) rename files under current direcotry, and in 'checksums'.
+# We (currently) rename files under current directory, and in 'checksums'.
# No need to go deeper (currently) and can be harm, since we do have a copy of
# 'repository' in there (so things things with same name as build directory, such
# as branding bundles? and /repository/binaries get renamed too, if we go too deep.

Back to the top