MozillaFirefox/create-tar.sh
author Wolfgang Rosenauer <wr@rosenauer.org>
Thu, 16 Nov 2017 21:22:39 +0100
branchfirefox57
changeset 1011 85bd01789b6f
parent 1005 6d716caa6abe
child 1012 0c59a30173da
permissions -rwxr-xr-x
Firefo 57.0 final release (incl. changelogs)
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     1
#!/bin/bash
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     2
909
c6717354928b Firefox 46.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 906
diff changeset
     3
# TODO
923
3cc9f17ca9bb prepare FF48
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 921
diff changeset
     4
# http://ftp.mozilla.org/pub/firefox/candidates/48.0-candidates/build2/linux-x86_64/en-US/firefox-48.0.json
3cc9f17ca9bb prepare FF48
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 921
diff changeset
     5
# "moz_source_stamp": "c1de04f39fa956cfce83f6065b0e709369215ed5"
3cc9f17ca9bb prepare FF48
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 921
diff changeset
     6
# http://ftp.mozilla.org/pub/firefox/candidates/48.0-candidates/build2/l10n_changesets.txt
909
c6717354928b Firefox 46.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 906
diff changeset
     7
1011
85bd01789b6f Firefo 57.0 final release (incl. changelogs)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1005
diff changeset
     8
CHANNEL="release"
340
aabcc7895695 update to version 8.0b1 (just merged stuff; build might still fail)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 337
diff changeset
     9
BRANCH="releases/mozilla-$CHANNEL"
1011
85bd01789b6f Firefo 57.0 final release (incl. changelogs)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1005
diff changeset
    10
RELEASE_TAG="8af8bd128bd014669ad89774f47668b0b8109337" # build 3
85bd01789b6f Firefo 57.0 final release (incl. changelogs)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1005
diff changeset
    11
VERSION="57.0"
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    12
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    13
# mozilla
646
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    14
if [ -d mozilla ]; then
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    15
  pushd mozilla
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    16
  _repourl=$(hg paths)
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    17
  case "$_repourl" in
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    18
    *$BRANCH*)
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    19
      echo "updating previous tree"
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    20
      hg pull
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    21
      popd
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    22
      ;;
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    23
    * )
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    24
      echo "removing obsolete tree"
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    25
      popd
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    26
      rm -rf mozilla
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    27
      ;;
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    28
  esac
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    29
fi
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    30
if [ ! -d mozilla ]; then
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    31
  echo "cloning new $BRANCH..."
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    32
  hg clone http://hg.mozilla.org/$BRANCH mozilla
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    33
fi
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    34
pushd mozilla
659
fa96cf6ffd14 Aurora 24 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 653
diff changeset
    35
hg update --check
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    36
[ "$RELEASE_TAG" == "default" ] || hg update -r $RELEASE_TAG
279
eb9e33036fb4 update to 5.0b6
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 277
diff changeset
    37
# get repo and source stamp
eb9e33036fb4 update to 5.0b6
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 277
diff changeset
    38
echo -n "REV=" > ../source-stamp.txt
eb9e33036fb4 update to 5.0b6
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 277
diff changeset
    39
hg -R . parent --template="{node|short}\n" >> ../source-stamp.txt
eb9e33036fb4 update to 5.0b6
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 277
diff changeset
    40
echo -n "REPO=" >> ../source-stamp.txt
eb9e33036fb4 update to 5.0b6
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 277
diff changeset
    41
hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" >> ../source-stamp.txt
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    42
popd
990
0d76004e9fa4 support parallel compression if available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 986
diff changeset
    43
0d76004e9fa4 support parallel compression if available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 986
diff changeset
    44
# use parallel compression, if available
0d76004e9fa4 support parallel compression if available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 986
diff changeset
    45
compression='-J'
0d76004e9fa4 support parallel compression if available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 986
diff changeset
    46
pixz -h > /dev/null 2>&1
0d76004e9fa4 support parallel compression if available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 986
diff changeset
    47
if (($? != 127)); then
0d76004e9fa4 support parallel compression if available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 986
diff changeset
    48
  compression='-Ipixz'
0d76004e9fa4 support parallel compression if available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 986
diff changeset
    49
fi
0d76004e9fa4 support parallel compression if available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 986
diff changeset
    50
409
ff30593d2daa switch to 12.0dev
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 408
diff changeset
    51
echo "creating archive..."
990
0d76004e9fa4 support parallel compression if available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 986
diff changeset
    52
tar $compression -cf firefox-$VERSION-source.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=CVS mozilla
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    53
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    54
# l10n
409
ff30593d2daa switch to 12.0dev
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 408
diff changeset
    55
echo "fetching locales..."
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    56
test ! -d l10n && mkdir l10n
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    57
for locale in $(awk '{ print $1; }' mozilla/browser/locales/shipped-locales); do
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    58
  case $locale in
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    59
    ja-JP-mac|en-US)
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    60
      ;;
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    61
    *)
909
c6717354928b Firefox 46.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 906
diff changeset
    62
      echo "reading changeset information for $locale"
c6717354928b Firefox 46.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 906
diff changeset
    63
      _changeset=$(grep ^$locale l10n_changesets.txt | awk '{ print $2; }')
c6717354928b Firefox 46.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 906
diff changeset
    64
      echo "fetching $locale changeset $_changeset ..."
340
aabcc7895695 update to version 8.0b1 (just merged stuff; build might still fail)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 337
diff changeset
    65
      hg clone http://hg.mozilla.org/releases/l10n/mozilla-$CHANNEL/$locale l10n/$locale
909
c6717354928b Firefox 46.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 906
diff changeset
    66
      [ "$RELEASE_TAG" == "default" ] || hg -R l10n/$locale up -C -r $_changeset
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    67
      ;;
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    68
  esac
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    69
done
409
ff30593d2daa switch to 12.0dev
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 408
diff changeset
    70
echo "creating l10n archive..."
990
0d76004e9fa4 support parallel compression if available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 986
diff changeset
    71
tar $compression -cf l10n-$VERSION.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg l10n
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    72
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    73
# compare-locales
409
ff30593d2daa switch to 12.0dev
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 408
diff changeset
    74
echo "creating compare-locales"
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    75
hg clone http://hg.mozilla.org/build/compare-locales
990
0d76004e9fa4 support parallel compression if available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 986
diff changeset
    76
tar $compression -cf compare-locales.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg compare-locales
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    77