Skip to content
Snippets Groups Projects
Commit 4e4949d7 authored by david_williams's avatar david_williams
Browse files

automate sending of "declared" mail

parent 971ff0ab
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ verboseFlag= ...@@ -14,7 +14,7 @@ verboseFlag=
deleteOld= deleteOld=
doCopy= doCopy=
projectname= projectname=
while getopts 'hvdcp:' OPTION while getopts 'hvdcsp:' OPTION
do do
case $OPTION in case $OPTION in
h) usage h) usage
...@@ -26,7 +26,9 @@ do ...@@ -26,7 +26,9 @@ do
;; ;;
c) doCopy=1 c) doCopy=1
;; ;;
p) projectname=$OPTARG s) sendmail=1
;;
p) projectname=$OPTARG
;; ;;
?) usage ?) usage
exit 2 exit 2
...@@ -179,10 +181,20 @@ then ...@@ -179,10 +181,20 @@ then
# remember TODIR already has a slash # remember TODIR already has a slash
${REMOTE_SSH_COMMAND} perl -w -pi -e ${replaceCommand} ${TODIR}${dropDirName}/*.php ${REMOTE_SSH_COMMAND} perl -w -pi -e ${replaceCommand} ${TODIR}${dropDirName}/*.php
# send notification mail only if copying?
else else
printf "\n\t%s\n\n" "Nothing copied: specify -c to actually do the copy" printf "\n\t%s\n\n" "Nothing copied: specify -c to actually do the copy"
fi fi
if [ $sendmail ]
then
./sendPromoteMail.sh "$projectname" "$TODIR" "$dropDirName"
echo "mail sent"
else
echo "no mail sent. Specify -s if desired"
fi
if [ $deleteOld ] if [ $deleteOld ]
then then
......
#!/bin/bash
PROJECT=$1
if [ -z $PROJECT ]
then
echo "must provide project name as first argumnet"
exit 9;
fi
TODIR=$2
if [ -z $TODIR ]
then
echo "must provide TODIR name as first argumnet"
exit 8;
fi
DROPDIR=$3
if [ -z $DROPDIR ]
then
echo "must provide DROPDIR name as first argumnet"
exit 7;
fi
# ideally, the user executing this mail will have this special file in their home direcotry,
# that can specify a custom 'from' variable, but still use your "real" ID that is subscribed
# to the mailing lists
# set from="\"Your Friendly WTP Builder\" <david_williams@us.ibm.com>"
# correction ... seems the subscription system set's the "from" name, so doesn't work when
# sent to mail list (just other email addresses)
export MAILRC=~/.buildermailrc
SUBJECT="Declaring Build for $PROJECT: $DROPDIR"
# wtp-dev for promotes, wtp-releng for smoketest requests
TO="wtp-dev@eclipse.org"
#make sure reply to goes back to the list
REPLYTO="wtp-dev@eclipse.org"
#we need to "fix up" TODIR since it's in file form, not URL
URLTODIR=${TODIR##*${DOWNLOAD_ROOT}}
mail -s "$SUBJECT" -R "$REPLYTO" "$TO" <<EOF
Download Page:
http://download.eclipse.org$URLTODIR$DROPDIR
General Smoketest results page:
http://wiki.eclipse.org/WTP_Smoke_Test_Results
EOF
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment