File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ DMG_PATH=""
3939if [[ -n " $BUNDLE_DIR " ]]; then
4040 APP_PATH=" $( find " $BUNDLE_DIR /macos" -maxdepth 1 -name " *.app" -type d | head -n1 || true) "
4141 DMG_PATH=" $( find " $BUNDLE_DIR /dmg" -maxdepth 1 -name " *.dmg" -type f | head -n1 || true) "
42+ if [[ -z " $DMG_PATH " && -n " $APP_PATH " ]]; then
43+ mkdir -p " $BUNDLE_DIR /dmg"
44+ DMG_PATH=" $BUNDLE_DIR /dmg/$( basename " ${APP_PATH% .app} " ) .dmg"
45+ fi
4246fi
4347
4448extract_notary_field () {
Original file line number Diff line number Diff line change @@ -263,4 +263,23 @@ assert_contains "$log_native" "--icon AI Gate.app 170 275"
263263assert_contains " $log_native " " --app-drop-link 630 275"
264264assert_not_contains " $log_native " " No macOS app bundle found"
265265
266+ repo_no_dmg=" $tmp_dir /repo-no-dmg"
267+ bin_no_dmg=" $tmp_dir /bin-no-dmg"
268+ log_no_dmg=" $tmp_dir /no-dmg.log"
269+ make_repo " $repo_no_dmg "
270+ make_fake_bin " $bin_no_dmg "
271+ make_fake_bundle_dmg_script " $repo_no_dmg "
272+ rm -f " $repo_no_dmg /desktop/src-tauri/target/universal-apple-darwin/release/bundle/dmg/AI Gate.dmg"
273+
274+ (
275+ cd " $repo_no_dmg "
276+ CALL_LOG=" $log_no_dmg " \
277+ PATH=" $bin_no_dmg :$PATH " \
278+ bash scripts/desktop/notarize_macos.sh
279+ )
280+
281+ assert_contains " $log_no_dmg " " bundle_dmg:--volname AI Gate Installer --background"
282+ assert_contains " $log_no_dmg " " $repo_no_dmg /desktop/src-tauri/target/universal-apple-darwin/release/bundle/dmg/AI Gate.dmg"
283+ assert_not_contains " $log_no_dmg " " No dmg found, create zip for notarization"
284+
266285echo " PASS: notarize_macos_test"
You can’t perform that action at this time.
0 commit comments