1 #!/bin/bash |
1 #!/bin/bash |
2 |
2 |
3 function print_usage_and_exit() { |
3 function print_usage_and_exit() { |
4 echo "Usage: create-tar.sh tar_stamp" |
4 echo "Usage: create-tar.sh tar_stamps" |
5 echo "" |
5 echo "" |
6 echo "Where tar_stamp should look like this:" |
6 echo "Where tar_stamps should look like this:" |
7 echo "" |
7 echo "" |
8 cat << EOF |
8 cat << EOF |
9 # Node ID: 64ee63facd4ff96b3e8590cff559d7e97ac6b061 |
9 # Node ID: 64ee63facd4ff96b3e8590cff559d7e97ac6b061 |
10 PRODUCT="firefox" # "firefox" or "thunderbird" |
10 PRODUCT="firefox" # "firefox" or "thunderbird" |
11 CHANNEL="esr60" |
11 CHANNEL="esr60" |
12 VERSION="60.7.0" |
12 VERSION="60.7.0" |
13 VERSION_SUFFIX="esr" |
13 VERSION_SUFFIX="esr" |
14 FF_RELEASE_TAG="" # Needs only to be set if no tar-ball can be downloaded |
14 RELEASE_TAG="" # Needs only to be set if no tar-ball can be downloaded |
15 TB_RELEASE_TAG="" # Only relevant for Thunderbird |
|
16 PREV_VERSION="60.6.3" # Prev. version only needed for locales (leave empty to force l10n-generation) |
15 PREV_VERSION="60.6.3" # Prev. version only needed for locales (leave empty to force l10n-generation) |
17 PREV_VERSION_SUFFIX="esr" |
16 PREV_VERSION_SUFFIX="esr" |
18 #SKIP_LOCALES="" # Uncomment to skip l10n and compare-locales-generation |
17 #SKIP_LOCALES="" # Uncomment to skip l10n and compare-locales-generation |
19 EOF |
18 EOF |
20 |
19 |
191 fi |
190 fi |
192 if [ ! -d $PRODUCT-$VERSION ]; then |
191 if [ ! -d $PRODUCT-$VERSION ]; then |
193 echo "cloning new $BRANCH..." |
192 echo "cloning new $BRANCH..." |
194 hg clone http://hg.mozilla.org/$BRANCH $PRODUCT-$VERSION |
193 hg clone http://hg.mozilla.org/$BRANCH $PRODUCT-$VERSION |
195 if [ "$PRODUCT" = "thunderbird" ]; then |
194 if [ "$PRODUCT" = "thunderbird" ]; then |
196 hg clone http://hg.mozilla.org/releases/comm-$CHANNEL thunderbird-$VERSION/comm |
195 hg clone http://hg.mozilla.org/releases/comm-$CHANNEL $PRODUCT-$VERSION/comm |
197 fi |
196 fi |
198 fi |
197 fi |
199 pushd $PRODUCT-$VERSION || exit 1 |
198 pushd $PRODUCT-$VERSION || exit 1 |
|
199 |
|
200 # parse out the Firefox-release tag for this Thunderbird-checkout |
|
201 if [ "$PRODUCT" = "thunderbird" ]; then |
|
202 FF_RELEASE_TAG=$(grep ^GECKO_HEAD_REV ./comm/.gecko_rev.yml | awk -F ' ' '{print $2}') || exit 1 |
|
203 echo "Parsed Firefox base ID from .gecko_rev.yml: $FF_RELEASE_TAG" |
|
204 else |
|
205 FF_RELEASE_TAG="$RELEASE_TAG" |
|
206 fi |
|
207 |
200 hg update --check $FF_RELEASE_TAG |
208 hg update --check $FF_RELEASE_TAG |
201 [ "$FF_RELEASE_TAG" == "default" ] || hg update -r $FF_RELEASE_TAG |
209 [ "$FF_RELEASE_TAG" == "default" ] || hg update -r $FF_RELEASE_TAG |
202 # get repo and source stamp |
210 # get repo and source stamp |
203 echo -n "REV=" > ../source-stamp.txt |
211 echo -n "REV=" > ../source-stamp.txt |
204 hg -R . parent --template="{node|short}\n" >> ../source-stamp.txt |
212 hg -R . parent --template="{node|short}\n" >> ../source-stamp.txt |
205 echo -n "REPO=" >> ../source-stamp.txt |
213 echo -n "REPO=" >> ../source-stamp.txt |
206 hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" >> ../source-stamp.txt |
214 hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" >> ../source-stamp.txt |
207 |
215 |
208 if [ "$PRODUCT" = "thunderbird" ]; then |
216 if [ "$PRODUCT" = "thunderbird" ]; then |
209 pushd comm || exit 1 |
217 pushd comm || exit 1 |
210 hg update --check $TB_RELEASE_TAG |
218 hg update --check $RELEASE_TAG |
211 popd || exit 1 |
219 popd || exit 1 |
212 rm -rf thunderbird-${VERSION}/{,comm/}other-licenses/7zstub |
220 rm -rf thunderbird-${VERSION}/{,comm/}other-licenses/7zstub |
213 fi |
221 fi |
214 popd || exit 1 |
222 popd || exit 1 |
215 |
223 |