From faeec9bc32d87955f6b121c3ffa3435dbfea24a9 Mon Sep 17 00:00:00 2001 From: mauro-balades Date: Wed, 4 Sep 2024 18:41:08 +0200 Subject: [PATCH] chore: Update codesigning script to sign the .app bundle with Apple Developer ID certificate --- .github/workflows/macos-alpha-build.yml | 13 ++++++++++++- scripts/download-language-packs.sh | 14 ++++++++------ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/macos-alpha-build.yml b/.github/workflows/macos-alpha-build.yml index 884eaeff3..7fb513be6 100644 --- a/.github/workflows/macos-alpha-build.yml +++ b/.github/workflows/macos-alpha-build.yml @@ -127,6 +127,13 @@ jobs: p12-file-base64: ${{ secrets.macOS_CERTIFICATES_P12_For_App_BASE64 }} p12-password: ${{ secrets.macOS_CERTIFICATES_P12_PASSWORD }} + + - name: Decode .p12 file + id: decode_p12 + run: echo "$P12_BASE64" | base64 --decode > certificate.p12 + env: + P12_BASE64: ${{ secrets.macOS_CERTIFICATES_P12_For_App_BASE64 }} + - name: Sign to .app 🖋️ run: | ls engine @@ -136,7 +143,9 @@ jobs: ./mach macos-sign \ --verbose \ -a "./obj-${{ matrix.arch == 'x64' && 'x86_64' || 'aarch64' }}-apple-darwin/dist/Zen Browser.app" \ - -s "${{ secrets.macOS_AppleDeveloperId }}" \ + -r \ + --rcodesign-p12-file $GITHUB_WORKSPACE/certificate.p12 \ + --rcodesign-p12-password "${{ secrets.macOS_CERTIFICATES_P12_PASSWORD }}" \ -e production - name: Package @@ -149,6 +158,8 @@ jobs: mv ./dist/*.dmg "zen.macos-${{ matrix.arch }}.dmg" mv ./dist/output.mar macos-${{ matrix.arch }}.mar + rm -rf certificate.p12 + - name: Sign to .dmg run: | codesign -s "${{ secrets.macOS_AppleDeveloperId }}" zen.macos-${{ matrix.arch }}.dmg diff --git a/scripts/download-language-packs.sh b/scripts/download-language-packs.sh index bb1807c7d..7fa70478f 100644 --- a/scripts/download-language-packs.sh +++ b/scripts/download-language-packs.sh @@ -8,18 +8,18 @@ git config --global fetch.prune true cd $CURRENT_DIR +cd ./l10n +git clone https://github.com/mozilla-l10n/firefox-l10n +cd $CURRENT_DIR + update_language() { langId=$1 cd ./l10n cd $langId echo "Updating $langId" - rm -rf .git - - git init - git remote add upstream https://github.com/mozilla-l10n/firefox-l10n/$langId - git remote set-url upstream https://github.com/mozilla-l10n/firefox-l10n/$langId - git pull upstream branches/default/tip + # move the contents from ../firefox-l10n/$langId to ./l10n/$langId + rsync -av --progress ../firefox-l10n/$langId/ . --exclude .git cd $CURRENT_DIR } @@ -47,3 +47,5 @@ for lang in $(cat ./l10n/supported-languages); do # remove every file except if it starts with "zen" find ./l10n/$lang -type f -not -name "zen*" -delete done + +rm -rf ./l10n/firefox-l10n