Source code

Revision control

Other Tools

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at
set -x -e
export LIPO=$MOZ_FETCHES_DIR/cctools/bin/x86_64-apple-darwin-lipo
export MKFSHFS=$MOZ_FETCHES_DIR/hfsplus-tools/newfs_hfs
export DMG_TOOL=$MOZ_FETCHES_DIR/dmg/dmg
export HFS_TOOL=$MOZ_FETCHES_DIR/dmg/hfsplus
for i in x64 aarch64; do
$GECKO_PATH/mach python -m mozbuild.action.unpack_dmg $MOZ_FETCHES_DIR/$i/target.dmg $i
$GECKO_PATH/mach python $GECKO_PATH/toolkit/mozapps/installer/ x64/*.app aarch64/*.app
$GECKO_PATH/mach python -m mozbuild.action.make_dmg x64 target.dmg
mkdir -p $UPLOAD_DIR
mv target.dmg $UPLOAD_DIR/
python3 -c '
import json
import os
for artifact in json.loads(os.environ["MOZ_FETCHES"]):
if artifact.get("extract") and artifact.get("dest", "").startswith("x64"):
print(artifact["dest"], os.path.basename(artifact["artifact"]))
' | while read dir artifact; do
if [ "$artifact" = ]; then
$GECKO_PATH/mach python $GECKO_PATH/python/mozbuild/mozbuild/action/ $MOZ_FETCHES_DIR/$dir $MOZ_FETCHES_DIR/aarch64${dir#x64}
$GECKO_PATH/mach python $GECKO_PATH/python/mozbuild/mozbuild/action/ $MOZ_FETCHES_DIR/$dir $MOZ_FETCHES_DIR/aarch64${dir#x64}
case $artifact in
find $MOZ_FETCHES_DIR/$dir -not -type d -printf '%P\0' | tar -C $MOZ_FETCHES_DIR/$dir --owner=0:0 --group=0:0 -zcf $artifact --no-recursion --null -T -
$GECKO_PATH/mach python $GECKO_PATH/python/mozbuild/mozbuild/action/ -C $MOZ_FETCHES_DIR/$dir $PWD/$artifact '*'
mv $artifact $UPLOAD_DIR/