diff --git a/bin/makedist-announcement b/bin/makedist-announcement index 01679e4..fbb0159 100755 --- a/bin/makedist-announcement +++ b/bin/makedist-announcement @@ -10,13 +10,11 @@ distribution="openmamba" TEXTDOMAIN="makedist"; export TEXTDOMAIN function usage() { - echo "\ -Usage: makedist-announcement distversion [mediumname] [--rebuild-announcement] [--rebuild-catalog]\ - [--send-email] [--send-test-email] [-h|--help]\ -\ -Example:\ -\ -makedist-announcement milestone2 livecd\ + echo $"Usage"": makedist-announcement distversion [mediumname] [--rebuild-announcement] [--rebuild-catalog] + [--send-email] [--send-test-email] [-h|--help] + +"$"Example"": +makedist-announcement milestone2 livecd --send-test-email " exit 1 @@ -66,7 +64,7 @@ if [ "$mediumname" ]; then it) export LC_ALL=it_IT.UTF8 ;; *) echo "Error: unsupported language $outputlang; aborting."; exit 1 ;; esac - export $SCRIPT_ENV_ADD + [ "$SCRIPT_ENV_ADD" ] && export $SCRIPT_ENV_ADD /usr/share/makedist/makedist-announcement.sh $distversion $mediumname $outputlang || exit 1 done fi @@ -78,11 +76,13 @@ fi > $indexfile for i in `seq 0 ${#MEDIA_NAME[*]}`; do mediumdir=/var/ftp/pub/$distribution/media/$distversion/${MEDIA_NAME[i]} + echo -n "${MEDIA_NAME[i]} " >> $indexfile for f in $mediumdir/info/release-announcement-*.$outputlang.html; do [ -r $f ] || continue version=`echo $f | sed "s|.*/release-announcement-\(.*\)\.$outputlang.html|\1|"` - echo "${MEDIA_NAME[i]} ${version}
" >> $indexfile + echo "${version}" >> $indexfile done + [ $i -lt ${#MEDIA_NAME[*]} ] && echo -n "
" >> $indexfile done done #fi diff --git a/config/20-makedist-autobuild b/config/20-makedist-autobuild index 290355d..be5d611 100755 --- a/config/20-makedist-autobuild +++ b/config/20-makedist-autobuild @@ -114,24 +114,24 @@ LANGUAGE=${DESTLANGUAGE} ARCH=${DESTARCH} FORCE=${MAKEDIST_FORCE} || { [ "$RELEASE/pre" != "$RELEASE" ] && ln -sf buildinfo-$RELEASE.inc.html $DESTDIR/buildinfo-pre.inc.html cd $DESTDIR md5sum $DESTNAME > $DESTMD5 + rm -f $DESTDIR/latest-is-*.txt + > $DESTLATEST if [ "${DESTIMG/.iso}" != "$DESTIMG" ]; then # ISO image, create video preview [ ! -e $DESTDIR/preview/$DESTNAME.ogv -o $SOURCEIMG -nt $DESTDIR/preview/$DESTNAME.ogv ] && makedist-recordvm $DESTIMG fi - rm -f $DESTDIR/latest-is-*.txt - > $DESTLATEST else [ -e $DESTDIR ] || mkdir -p $DESTDIR cp $SOURCEIMG $DESTIMG cp $SOURCEDIR/.${DESTFILENAME}.inc.html $DESTDIR/buildinfo.inc.html cd $DESTDIR md5sum $DESTNAME > $DESTMD5 + rm -f $DESTDIR/latest-is-*.txt + > $DESTLATEST if [ "${DESTIMG/.iso}" != "$DESTIMG" ]; then # ISO image, create video preview [ ! -e $DESTDIR/preview/$DESTNAME.ogv -o $SOURCEIMG -nt $DESTDIR/preview/$DESTNAME.ogv ] && makedist-recordvm $DESTIMG fi - rm -f $DESTDIR/latest-is-*.txt - > $DESTLATEST fi fi if [ "$DIST_CREATED" = "1" -o $DESTIMG -nt $DESTTORRENT -o \ @@ -269,7 +269,7 @@ _EOF done DIST_DWD="$DIST_DWD" DIST_LINE="${MEDIA_NAME[$m]}" - [ $DIST_CREATED ] && DIST_LINE="$DIST_LINE" + [ "$DIST_CREATED" = "1" ] && DIST_LINE="$DIST_LINE" echo "${DIST_LINE}$SNAPDATE${DIST_DWD}" >>$releasetempfile.${HTMLLANG} cat >> $tempfile2 << _EOF @@ -287,6 +287,14 @@ _EOF fi mv $tempfile2 $DESTHTML chmod +r $DESTHTML + if [ "$DIST_CREATED" = "1" ]; then + # snapshots + makedist-announcement --send-email $DISTVERSION $PRODNAME + elif [ "$RELEASEPLATFORM" = "$MEDIUMPLATFORM" -a \ + "$RELEASESUBPLATFORM" = "$MEDIUMSUBPLATFORM" ]; then + # stable + makedist-announcement --send-test-email $DISTVERSION $PRODNAME + fi } releasetempfile=`tempfile 2>/dev/null` || releasetempfile=/tmp/makedist_tmpfile @@ -308,7 +316,7 @@ for i in `seq 0 $ALLMEDIASLAST`; do medium_name=`arch=_SPLIT_ PLATFORM=$SUBPLATFORM media_name` || medium_name=`arch=_SPLIT_ media_name` medium_suffix=${medium_name/*_SPLIT_\./} - [ $PRODUCT_NAME ] || PRODUCT_NAME=$PLATFORM + [ $PRODUCT_NAME ] || PRODUCT_NAME=${MEDIA_NAME[i]} [ "$PRODUCT_NAME_OVERRIDE" ] && PRODUCT_NAME=$PRODUCT_NAME_OVERRIDE unset latest diff --git a/config/makedist b/config/makedist index e246490..fdca1b6 100644 --- a/config/makedist +++ b/config/makedist @@ -8,6 +8,13 @@ HTML_LANGS="it en" # enable cron for autobuilds MAKEDIST_CRON_ENABLE=1 +# announcements configuration +#ANNOUNCEMENTS_EMAILS_TEST="test@example.com" +#ANNOUNCEMENTS_EMAILS_STABLE_EN="stable-users@example.com" +#ANNOUNCEMENTS_EMAILS_STABLE_IT="utenti-stabile@example.com" +#ANNOUNCEMENTS_EMAILS_DEVEL_EN="devel-users@example.com" +#ANNOUNCEMENTS_EMAILS_DEVEL_IT="utenti-devel@example.com" + # # media configuration # @@ -103,7 +110,7 @@ if [ "$RELEASE" ]; then MEDIA_ARCHS[4]="i586" MEDIA_BUILDDAY[4]=8 - MEDIA_NAME[5]=sdk + MEDIA_NAME[5]=sdk-root MEDIA_TARGET[5]=openmamba MEDIA_PLATFORM[5]=sdk-root MEDIA_SUBPLATFORM[5]= @@ -186,13 +193,13 @@ else MEDIA_ARCHS[7]="i586" MEDIA_BUILDDAY[7]=3 - MEDIA_NAME[8]=sdk + MEDIA_NAME[8]=sdk-root MEDIA_TARGET[8]=openmamba MEDIA_PLATFORM[8]=sdk-root MEDIA_SUBPLATFORM[8]= MEDIA_LANGUAGES[8]="it en es" MEDIA_ARCHS[8]="arm i586" - MEDIA_BUILDDAY[8]=3 + MEDIA_BUILDDAY[8]=2 MEDIA_NAME[9]=rootfs MEDIA_TARGET[9]=openmamba @@ -200,7 +207,7 @@ else MEDIA_SUBPLATFORM[9]= MEDIA_LANGUAGES[9]="it en es" MEDIA_ARCHS[9]="arm i586" - MEDIA_BUILDDAY[9]=1 + MEDIA_BUILDDAY[9]=5 MEDIA_NAME[10]=bootcd MEDIA_TARGET[10]=openmamba diff --git a/makedist/makedist-announcement.sh b/makedist/makedist-announcement.sh index 561fee5..9ec42ea 100755 --- a/makedist/makedist-announcement.sh +++ b/makedist/makedist-announcement.sh @@ -483,11 +483,17 @@ if [ "$SENDEMAIL" -o "$SENDTESTEMAIL" ]; then if [ ! "$SENDADDRESSES" ]; then if [ "$SENDTESTEMAIL" ]; then - SENDADDRESSES="test@openmamba.org" + SENDADDRESSES=$ANNOUNCEMENTS_EMAILS_TEST + elif [ "$distversion" = "devel" ]; then + case $outputlang in + en) SENDADDRESSES="$ANNOUNCEMENTS_EMAILS_DEVEL_EN" ;; + it) SENDADDRESSES="$ANNOUNCEMENTS_EMAILS_DEVEL_IT" ;; + *) SENDADDRESSES= ;; + esac else case $outputlang in - en) SENDADDRESSES="openmamba-users@openmamba.org openmamba-devel@openmamba.org distro@distrowatch.com" ;; - it) SENDADDRESSES="openmamba-users-it@openmamba.org openmamba-devel-it@openmamba.org" ;; + en) SENDADDRESSES="$ANNOUNCEMENTS_EMAILS_STABLE_EN" ;; + it) SENDADDRESSES="$ANNOUNCEMENTS_EMAILS_STABLE_IT" ;; *) SENDADDRESSES= ;; esac fi