69 if [ "$PRODUCT" = "firefox" ]; then |
69 if [ "$PRODUCT" = "firefox" ]; then |
70 FF_LOCALE_FILE="firefox-$VERSION/browser/locales/l10n-changesets.json" |
70 FF_LOCALE_FILE="firefox-$VERSION/browser/locales/l10n-changesets.json" |
71 else |
71 else |
72 FF_LOCALE_FILE="thunderbird-$VERSION/browser/locales/l10n-changesets.json" |
72 FF_LOCALE_FILE="thunderbird-$VERSION/browser/locales/l10n-changesets.json" |
73 TB_LOCALE_FILE="thunderbird-$VERSION/comm/mail/locales/l10n-changesets.json" |
73 TB_LOCALE_FILE="thunderbird-$VERSION/comm/mail/locales/l10n-changesets.json" |
74 L10N_STRING_PATTERNS="thunderbird-$VERSION/python/l10n/tbxchannel/l10n_merge.py" |
74 FF_PREV_LOCALE_FILE="thunderbird-$PREV_VERSION/browser/locales/l10n-changesets.json" |
|
75 TB_PREV_LOCALE_FILE="thunderbird-$PREV_VERSION/comm/mail/locales/l10n-changesets.json" |
|
76 L10N_STRING_PATTERNS="thunderbird-$VERSION/comm/python/l10n/tbxchannel/l10n_merge.py" |
75 fi |
77 fi |
76 |
78 |
77 SOURCE_TARBALL="$PRODUCT-$VERSION$VERSION_SUFFIX.source.tar.xz" |
79 SOURCE_TARBALL="$PRODUCT-$VERSION$VERSION_SUFFIX.source.tar.xz" |
78 PREV_SOURCE_TARBALL="$PRODUCT-$PREV_VERSION$PREV_VERSION_SUFFIX.source.tar.xz" |
80 PREV_SOURCE_TARBALL="$PRODUCT-$PREV_VERSION$PREV_VERSION_SUFFIX.source.tar.xz" |
79 FTP_URL="https://ftp.mozilla.org/pub/$PRODUCT/releases/$VERSION$VERSION_SUFFIX/source" |
81 FTP_URL="https://ftp.mozilla.org/pub/$PRODUCT/releases/$VERSION$VERSION_SUFFIX/source" |
98 echo "Download file" |
100 echo "Download file" |
99 else |
101 else |
100 local CANDIDATE_TARBALL_LOCATION="" |
102 local CANDIDATE_TARBALL_LOCATION="" |
101 CANDIDATE_TARBALL_LOCATION="$(printf "%s/%s/source/%s" "$(get_ftp_candidates_url "$PRODUCT" "$VERSION$VERSION_SUFFIX")" "$BUILD_ID" "$TARBALL" )" |
103 CANDIDATE_TARBALL_LOCATION="$(printf "%s/%s/source/%s" "$(get_ftp_candidates_url "$PRODUCT" "$VERSION$VERSION_SUFFIX")" "$BUILD_ID" "$TARBALL" )" |
102 if wget --spider "$CANDIDATE_TARBALL_LOCATION" 2> /dev/null; then |
104 if wget --spider "$CANDIDATE_TARBALL_LOCATION" 2> /dev/null; then |
103 echo "Download UNRELEASED candidate" |
105 echo "Download UNRELEASED candidate ($BUILD_ID)" |
104 else |
106 else |
105 echo "Mercurial checkout" |
107 echo "Mercurial checkout" |
106 fi |
108 fi |
107 fi |
109 fi |
108 } |
110 } |
311 if [ "$PREV_VERSION" != "" ]; then |
313 if [ "$PREV_VERSION" != "" ]; then |
312 # If we have a previous version, check either FF or (TB and FF) |
314 # If we have a previous version, check either FF or (TB and FF) |
313 if [ "$PRODUCT" = "firefox" ]; then |
315 if [ "$PRODUCT" = "firefox" ]; then |
314 locales_unchanged "$PRODUCT" "$BUILD_ID" |
316 locales_unchanged "$PRODUCT" "$BUILD_ID" |
315 else |
317 else |
316 FF_BUILD_ID=$(get_build_number "firefox" "$VERSION$VERSION_SUFFIX") |
318 # Currently, upstream 'forgets' which Firefox-locales get used for which Thunderbird-release upon release |
317 locales_unchanged "$PRODUCT" "$BUILD_ID" && locales_unchanged "firefox" "$FF_BUILD_ID" |
319 # so, instead of parsing upstream JSON-files, we rely on the previous tarball being there and comparing |
|
320 # the lang-files directly |
|
321 # FF_BUILD_ID=$(get_build_number "firefox" "$VERSION$VERSION_SUFFIX") |
|
322 # locales_unchanged "$PRODUCT" "$BUILD_ID" && locales_unchanged "firefox" "$FF_BUILD_ID" |
|
323 if [ -e "$PREV_SOURCE_TARBALL" ]; then |
|
324 echo "extract previous locale changesets" |
|
325 tar -xf "$PREV_SOURCE_TARBALL" "$FF_PREV_LOCALE_FILE" "$TB_PREV_LOCALE_FILE" |
|
326 |
|
327 curr_ff_content=$(locales_parse_file "$FF_LOCALE_FILE") || exit 1 |
|
328 prev_ff_content=$(locales_parse_file "$FF_PREV_LOCALE_FILE") || exit 1 |
|
329 curr_tb_content=$(locales_parse_file "$TB_LOCALE_FILE") || exit 1 |
|
330 prev_tb_content=$(locales_parse_file "$TB_PREV_LOCALE_FILE") || exit 1 |
|
331 |
|
332 diff -y --suppress-common-lines -d <(echo "$prev_ff_content") <(echo "$curr_ff_content") || |
|
333 diff -y --suppress-common-lines -d <(echo "$prev_tb_content") <(echo "$curr_tb_content") |
|
334 fi |
318 fi |
335 fi |
319 LOCALES_CHANGED=$? |
336 LOCALES_CHANGED=$? |
320 fi |
337 fi |
321 |
338 |
322 # New line for better visibility |
339 # New line for better visibility |
418 echo "RELEASE_REPO=$SOURCE_REPO" >> "$TAR_STAMP" |
435 echo "RELEASE_REPO=$SOURCE_REPO" >> "$TAR_STAMP" |
419 echo "RELEASE_TAG=$REV" >> "$TAR_STAMP" |
436 echo "RELEASE_TAG=$REV" >> "$TAR_STAMP" |
420 echo "RELEASE_TIMESTAMP=$TIMESTAMP" >> "$TAR_STAMP" |
437 echo "RELEASE_TIMESTAMP=$TIMESTAMP" >> "$TAR_STAMP" |
421 |
438 |
422 echo "creating archive..." |
439 echo "creating archive..." |
423 tar "$compression" -cf "$PRODUCT-$VERSION$VERSION_SUFFIX.source.tar.xz" --exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=CVS "$PRODUCT-$VERSION" |
440 tar "$compression" -cf "$PRODUCT-$VERSION$VERSION_SUFFIX.source.tar.xz" --exclude-vcs "$PRODUCT-$VERSION" |
424 ALREADY_EXTRACTED_LOCALES_FILE=1 |
441 ALREADY_EXTRACTED_LOCALES_FILE=1 |
425 } |
442 } |
426 |
443 |
427 function create_locales_tarballs() { |
444 function create_locales_tarballs() { |
428 if [ ! -z ${SKIP_LOCALES+x} ]; then |
445 if [ ! -z ${SKIP_LOCALES+x} ]; then |
499 fi |
516 fi |
500 ;; |
517 ;; |
501 esac |
518 esac |
502 done |
519 done |
503 echo "creating l10n archive..." |
520 echo "creating l10n archive..." |
|
521 local TAR_FLAGS="--exclude-vcs" |
504 if [ "$PRODUCT" = "thunderbird" ]; then |
522 if [ "$PRODUCT" = "thunderbird" ]; then |
505 TB_TAR_FLAGS="--exclude=suite" |
523 TAR_FLAGS="$TAR_FLAGS --exclude=suite" |
506 fi |
524 fi |
507 tar "$compression" -cf "l10n-$VERSION$VERSION_SUFFIX.tar.xz" \ |
525 tar "$compression" -cf "l10n-$VERSION$VERSION_SUFFIX.tar.xz" $TAR_FLAGS "$FINAL_L10N_BASE" |
508 --exclude=.hgtags --exclude=.hgignore --exclude=.hg \ |
|
509 "$TB_TAR_FLAGS" \ |
|
510 "$FINAL_L10N_BASE" |
|
511 } |
526 } |
512 |
527 |
513 function clean_up_old_tarballs() { |
528 function clean_up_old_tarballs() { |
514 if [ -e "$PREV_SOURCE_TARBALL" ]; then |
529 if [ -e "$PREV_SOURCE_TARBALL" ]; then |
515 echo "" |
530 echo "" |