Mal wieder was Neues aus der Schublade „choice.sh“ zum Bauen v.a. von Lightning. Es ist alles etwas übersichtlicher geworden, seitdem Sunbird ja nun wirklich fort ist und ich mit dem Script nur noch auf deutschsprachige Pakete ziele. Wo es einigermaßen Sinn macht, versuche ich mir nun das Hochsetzen von Versionsnummern (mit dem aktuellen Release-Zirkus ein häufig notwendiger Sport) mit Hilfe von Variablen einfacher zu machen.
#!/bin/bash CENTRALTB=37.0a1 CENTRALLTN=3.9a1 CENTRALGDATA=0.38pre AUROTB=36.0a2 AUROLTN=3.8a2 AUROGDATA=0.37pre BETATB=35.0 BETALTN=3.7 BETAGDATA=0.36 ECHO "**************************************************" ECHO "** COMM-CENTRAL (DAILY) **" ECHO "**************************************************" ECHO "Tb ${CENTRALTB}DE + Ltn ${CENTRALLTN}DE [1] CHECKOUT [2] BUILD" ECHO "Ltn ${CENTRALLTN}DE ONLY [3] BUILD" ECHO "**************************************************" ECHO "** COMM-AURORA (EARLYBIRD) **" ECHO "**************************************************" ECHO "Tb ${AUROTB}DE + Ltn ${AUROLTN}DE [4] CHECKOUT [5] BUILD" ECHO "Ltn ${AUROLTN}DE ONLY [6] BUILD" ECHO "**************************************************" ECHO "** COMM-BETA (BETA) **" ECHO "**************************************************" ECHO "Tb ${BETATB} DE + Ltn ${BETALTN}DE [e] CHECKOUT [r] BUILD" ECHO "Ltn ${BETALTN}DE ONLY [t] BUILD" read CHOICE case "$CHOICE" in "1" ) # --------------------------------------------- # ## checkout ## comm-central ## Thunderbird ## # # --------------------------------------------- echo " .mozconfig anlegen..." cp comm-central/mozconfig-tb-de comm-central/comm-central/.mozconfig echo " Starte Checkout von comm-central..." DATUM=`date -u '+%Y%m%d-%H%M_%Z'` cd comm-central/comm-central python client.py checkout cd .. cd de hg pull --rebase cd .. compare-locales comm-central/calendar/locales/l10n.ini . de | tee l10n-status.txt mv l10n-status.txt logs/l10n-status-cc-DE-${DATUM}.txt ;; "2" ) # --------------------------------------------- # ## build ## comm-central ## Thunderbird ## # # --------------------------------------------- DATUM=`date -u '+%Y%m%d-%H%M_%Z'` { echo " .mozconfig anlegen..." cp comm-central/mozconfig-tb-de comm-central/comm-central/.mozconfig echo " Baue von comm-central..." mkdir comm-central/Pakete/${DATUM} cd comm-central/comm-central mozilla/mach build # work around package failure because of dictionaries cd mail/installer cp package-manifest.in package-manifest.orig grep -v "@RESPATH@/dictionaries/*" package-manifest.in > package-manifest.hack mv -f package-manifest.hack package-manifest.in cd ../.. mozilla/mach package # revert work around package failure because of dictionaries cd mail/installer mv -f package-manifest.orig package-manifest.in cd ../.. if [ "$?" -eq "0" ]; then cd obj-i686-pc-mingw32 mv dist/xpi-stage/inspector-2.0.15pre.xpi ../../Pakete/${DATUM}/inspector-2.0.15pre_${DATUM}.xpi mv dist/xpi-stage/lightning-${CENTRALLTN}.de.win32.xpi ../../Pakete/${DATUM}/lightning-${CENTRALLTN}.de.win32.xpi mv dist/xpi-stage/gdata-provider-${CENTRALGDATA}.de.win32.xpi ../../Pakete/${DATUM}/gdata-provider-${CENTRALGDATA}.de.win32.xpi mv dist/xpi-stage/dbgserver-${CENTRALTB}.de.xpi ../../Pakete/${DATUM}/dbgserver-${CENTRALTB}.de.xpi echo " --- Fertig. ---" echo " --- Pakete unter C:buildscomm-centralPakete. ---" fi } 2>&1 | tee -a comm-central/buildlog.txt mv comm-central/buildlog.txt comm-central/logs/build-tb${CENTRALTB}-de_${DATUM}.log ;; "3" ) # --------------------------------------------- # ## build ## comm-central ## Lightning ## # # --------------------------------------------- echo " .mozconfig anlegen..." cp comm-central/mozconfig-tb-de comm-central/comm-central/.mozconfig echo " Baue von comm-central..." DATUM=`date -u '+%Y%m%d-%H%M_%Z'` mkdir comm-central/Pakete/${DATUM} cd comm-central/comm-central/obj-i686-pc-mingw32/calendar mozmake -C lightning cd ../.. # work around package failure because of dictionaries cd mail/installer cp package-manifest.in package-manifest.orig grep -v "@BINPATH@/dictionaries/*" package-manifest.in > package-manifest.hack mv -f package-manifest.hack package-manifest.in cd ../.. mozilla/mach package # revert work around package failure because of dictionaries cd mail/installer mv -f package-manifest.orig package-manifest.in cd ../.. mv obj-i686-pc-mingw32/dist/xpi-stage/lightning-${CENTRALLTN}.de.win32.xpi ../Pakete/${DATUM}/lightning-${CENTRALLTN}.de.win32.xpi echo " --- Fertig. ---" echo " --- Pakete unter C:buildscomm-centralPakete. ---" ;; "4" ) # --------------------------------------------- # ## checkout ## comm-aurora ## Thunderbird ## # # --------------------------------------------- echo " .mozconfig anlegen..." cp comm-aurora/mozconfig-tb-de comm-aurora/comm-aurora/.mozconfig echo " Starte Checkout von comm-aurora..." DATUM=`date -u '+%Y%m%d-%H%M_%Z'` cd comm-aurora/comm-aurora python client.py checkout cd .. cd de hg pull -u cd .. compare-locales comm-aurora/calendar/locales/l10n.ini . de | tee l10n-status.txt mv l10n-status.txt logs/l10n-status-comm-aurora-DE-${DATUM}.txt ;; "5" ) # --------------------------------------------- # ## build ## comm-aurora ## Thunderbird ## # # --------------------------------------------- DATUM=`date -u '+%Y%m%d-%H%M_%Z'` { echo " .mozconfig anlegen..." cp comm-aurora/mozconfig-tb-de comm-aurora/comm-aurora/.mozconfig echo " Baue von comm-aurora..." mkdir comm-aurora/Pakete/${DATUM} cd comm-aurora/comm-aurora mozilla/mach build # work around package failure because of dictionaries cd mail/installer cp package-manifest.in package-manifest.orig grep -v "@RESPATH@/dictionaries/*" package-manifest.in > package-manifest.hack mv -f package-manifest.hack package-manifest.in cd ../.. mozilla/mach package # revert work around package failure because of dictionaries cd mail/installer mv -f package-manifest.orig package-manifest.in cd ../.. if [ "$?" -eq "0" ]; then cd obj-i686-pc-mingw32 mv dist/thunderbird-${AUROTB}.de.win32.zip ../../Pakete/${DATUM}/thunderbird-${AUROTB}.de.win32.zip mv dist/xpi-stage/inspector-2.0.15pre.xpi ../../Pakete/${DATUM}/inspector-2.0.15pre_${DATUM}.xpi mv dist/xpi-stage/lightning-${AUROLTN}.de.win32.xpi ../../Pakete/${DATUM}/lightning-${AUROLTN}.de.win32.xpi mv dist/xpi-stage/gdata-provider-${AUROGDATA}.de.win32.xpi ../../Pakete/${DATUM}/gdata-provider-${AUROGDATA}.de.win32.xpi mv dist/xpi-stage/dbgserver-36.0a2.de.xpi ../../Pakete/${DATUM}/dbgserver-36.0a2.de.xpi echo " --- Fertig. ---" echo " --- Pakete unter C:buildscomm-auroraPakete. ---" fi } 2>&1 | tee -a comm-aurora/buildlog.txt mv comm-aurora/buildlog.txt comm-aurora/logs/build-tb${AUROTB}-de_${DATUM}.log ;; "6" ) # --------------------------------------------- # ## build ## comm-aurora ## Lightning ## # # --------------------------------------------- echo " .mozconfig anlegen..." cp comm-aurora/mozconfig-tb-de comm-aurora/comm-aurora/.mozconfig echo " Baue von comm-aurora..." DATUM=`date -u '+%Y%m%d-%H%M_%Z'` mkdir comm-aurora/Pakete/${DATUM} cd comm-aurora/comm-aurora/obj-i686-pc-mingw32/calendar mozmake -C lightning cd ../.. # work around package failure because of dictionaries cd mail/installer cp package-manifest.in package-manifest.orig grep -v "@BINPATH@/dictionaries/*" package-manifest.in > package-manifest.hack mv -f package-manifest.hack package-manifest.in cd ../.. mozilla/mach package # revert work around package failure because of dictionaries cd mail/installer mv -f package-manifest.orig package-manifest.in cd ../.. mv obj-i686-pc-mingw32/dist/xpi-stage/lightning-${AUROLTN}.win32.xpi ../Pakete/${DATUM}/lightning-${AUROLTN}_de_tb_win32.xpi echo " --- Fertig. ---" echo " --- Pakete unter C:buildscomm-auroraPakete. ---" ;; "e" ) # --------------------------------------------- # ## checkout ## comm-beta ## Thunderbird ## # # --------------------------------------------- echo " .mozconfig anlegen..." cp comm-beta/mozconfig-tb-de comm-beta/comm-beta/.mozconfig echo " Starte Checkout von comm-beta..." DATUM=`date -u '+%Y%m%d-%H%M_%Z'` cd comm-beta/comm-beta python client.py checkout cd .. cd de hg pull --rebase cd .. compare-locales comm-beta/calendar/locales/l10n.ini . de | tee l10n-status.txt mv l10n-status.txt logs/l10n-status-comm-beta-DE-${DATUM}.txt ;; "r" ) # --------------------------------------------- # ## build ## comm-beta ## Thunderbird ## # # --------------------------------------------- DATUM=`date -u '+%Y%m%d-%H%M_%Z'` { echo " .mozconfig anlegen..." cp comm-beta/mozconfig-tb-de comm-beta/comm-beta/.mozconfig echo " Baue von comm-beta..." mkdir comm-beta/Pakete/${DATUM} cd comm-beta/comm-beta # work around | bug 1074711 - make vs mozmake cd config mv baseconfig.mk baseconfig.mk.orig mv baseconfig.mk.hack baseconfig.mk cd .. mozilla/mach build # work around package failure because of dictionaries cd mail/installer cp package-manifest.in package-manifest.orig grep -v "@BINPATH@/dictionaries/*" package-manifest.in > package-manifest.hack mv -f package-manifest.hack package-manifest.in cd ../.. mozilla/mach package # revert work around package failure because of dictionaries cd mail/installer mv -f package-manifest.orig package-manifest.in cd ../.. # revert work around | bug 1074711 - make vs mozmake cd config mv baseconfig.mk baseconfig.mk.hack mv baseconfig.mk.orig baseconfig.mk cd .. if [ "$?" -eq "0" ]; then cd obj-i686-pc-mingw32 mv dist/thunderbird-${BETATB}.de.win32.zip ../../Pakete/${DATUM}/thunderbird-${BETATB}.de.win32.zip mv dist/xpi-stage/inspector-2.0.15pre.xpi ../../Pakete/${DATUM}/inspector-2.0.15pre_${DATUM}.xpi mv dist/xpi-stage/lightning-${BETALTN}.de.win32.xpi ../../Pakete/${DATUM}/lightning-${BETALTN}.de.win32.xpi mv dist/xpi-stage/gdata-provider-${BETAGDATA}.de.win32.xpi ../../Pakete/${DATUM}/gdata-provider-${BETAGDATA}.de.win32.xpi mv dist/xpi-stage/dbgserver-35.0.de.xpi ../../Pakete/${DATUM}/dbgserver-35.0.de.xpi echo " --- Fertig. ---" echo " --- Pakete unter C:buildscomm-betaPakete. ---" fi } 2>&1 | tee -a comm-beta/buildlog.txt mv comm-beta/buildlog.txt comm-beta/logs/build-tb${BETATB}-de_${DATUM}.log ;; "t" ) # --------------------------------------------- # ## build ## comm-beta ## Lightning ## # # --------------------------------------------- echo " .mozconfig anlegen..." cp comm-beta/mozconfig-tb-de comm-beta/comm-beta/.mozconfig echo " Baue von comm-beta..." DATUM=`date -u '+%Y%m%d-%H%M_%Z'` mkdir comm-beta/Pakete/${DATUM} cd comm-beta/comm-beta/obj-i686-pc-mingw32/calendar mozmake -C lightning cd ../.. # work around package failure because of dictionaries cd mail/installer cp package-manifest.in package-manifest.orig grep -v "@BINPATH@/dictionaries/*" package-manifest.in > package-manifest.hack mv -f package-manifest.hack package-manifest.in cd ../.. mozilla/mach package # revert work around package failure because of dictionaries cd mail/installer mv -f package-manifest.orig package-manifest.in cd ../.. mv obj-i686-pc-mingw32/dist/xpi-stage/lightning-${BETALTN}.de.win32.xpi ../Pakete/${DATUM}/lightning-${BETALTN}.de.win32.xpi echo " --- Fertig. ---" echo " --- Pakete unter C:buildscomm-betaPakete. ---" ;; esac |
Ein paar Verrenkungen sind noch nötig: Wie ich Thunderbird dazu bewege, das Wörterbuch entweder mitzubauen oder beim Packen einfach zu ignorieren, habe ich z.B. noch nicht verstanden. Die Bastelei an der baseconfig.mk (make vs. mozmake) sollte nach der nächsten Runde Mergerei ausgeschwitzt sein.
Wer möchte: choice_201412.sh.