diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ff7f653e..ddfc4a75 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1033,13 +1033,16 @@ jobs: desc "Desktop app for managing .NET MAUI developer tools" homepage "https://github.com/Redth/MAUI.Sherpa" - depends_on macos: ">= :ventura" + livecheck do + url :url + strategy :github_latest + end + + depends_on macos: :sequoia app "MAUI Sherpa.app" - zap trash: [ - "~/.maui-sherpa", - ] + zap trash: "~/.maui-sherpa" end CASK diff --git a/README.md b/README.md index 69e38e29..0be56acf 100644 --- a/README.md +++ b/README.md @@ -226,6 +226,11 @@ Download the latest release from the [Releases](https://github.com/Redth/MAUI.Sh #### macOS (Homebrew) ```bash +brew install --cask maui-sherpa +``` + +If the cask hasn't propagated to your Homebrew yet, or to track pre-release builds, use the tap: +```bash brew install --cask redth/tap/maui-sherpa ``` diff --git a/packaging/homebrew-cask/README.md b/packaging/homebrew-cask/README.md new file mode 100644 index 00000000..9ed1c98b --- /dev/null +++ b/packaging/homebrew-cask/README.md @@ -0,0 +1,66 @@ +# Submitting MAUI Sherpa to the official Homebrew Cask + +This directory holds the reference cask used to publish **MAUI Sherpa** to the +official [`Homebrew/homebrew-cask`](https://github.com/Homebrew/homebrew-cask) +repository, so users can install with: + +```bash +brew install --cask maui-sherpa +``` + +The [`Redth/homebrew-tap`](https://github.com/Redth/homebrew-tap) tap is kept as +a fallback (and is the only channel that carries pre-release builds). It is +auto-updated on every stable release by the `update-homebrew` job in +`.github/workflows/build.yml`. + +## Why this project qualifies + +`brew audit --new --cask` enforces a notability bar and that the app passes +Gatekeeper. MAUI Sherpa meets both: + +- **Notable**: well above the ~75-star / 30-fork / 30-watcher threshold. +- **Signed + notarized + stapled**: the macOS app is hardened-runtime signed, + notarized with `notarytool`, and stapled by the `notarize-macos` job. +- **Minimum macOS**: the app's supported minimum is macOS **Sequoia (15)** — + set via `SupportedOSPlatformVersion` in `MauiSherpa.MacOS.csproj` (the + `net10.0-macos` head) — so the cask declares `depends_on macos: :sequoia`. + Keep this in sync if the app's deployment target changes. + +## One-time submission steps + +1. Fork `Homebrew/homebrew-cask` (or let `brew bump-cask-pr` do it for you). +2. Make sure `maui-sherpa.rb` in this folder matches the latest stable release + (version + sha256). The sha256 is for `MAUI-Sherpa.macos.zip`: + + ```bash + VERSION=0.11.2 + curl -fSL -o /tmp/MAUI-Sherpa.macos.zip \ + "https://github.com/Redth/MAUI.Sherpa/releases/download/v${VERSION}/MAUI-Sherpa.macos.zip" + shasum -a 256 /tmp/MAUI-Sherpa.macos.zip + ``` + +3. Validate locally before opening the PR: + + ```bash + brew style packaging/homebrew-cask/maui-sherpa.rb + # Drop the file into a scratch tap to run the strict "new cask" audit: + brew tap-new redth/casktest --no-git + mkdir -p "$(brew --repository redth/casktest)/Casks/m" + cp packaging/homebrew-cask/maui-sherpa.rb \ + "$(brew --repository redth/casktest)/Casks/m/maui-sherpa.rb" + brew audit --new --cask --online redth/casktest/maui-sherpa + brew untap redth/casktest # cleanup + ``` + +4. Copy the cask into your homebrew-cask fork at `Casks/m/maui-sherpa.rb`, + commit on a branch named `maui-sherpa`, and open a PR titled + `Add maui-sherpa `. + +## After it's accepted + +- Future version bumps are handled automatically by Homebrew's BrewTestBot + (driven by the `livecheck` stanza) — no manual PRs needed. +- Keep the `update-homebrew` job so the `Redth/homebrew-tap` fallback and + pre-release channel stay current. +- The README points users at `brew install --cask maui-sherpa` with the tap as + a documented fallback. diff --git a/packaging/homebrew-cask/maui-sherpa.rb b/packaging/homebrew-cask/maui-sherpa.rb new file mode 100644 index 00000000..21223264 --- /dev/null +++ b/packaging/homebrew-cask/maui-sherpa.rb @@ -0,0 +1,20 @@ +cask "maui-sherpa" do + version "0.11.2" + sha256 "a49dfe86206d629f7a98bfa8b28e48d88fbf163419bab3b12cd6680a93cac8b4" + + url "https://github.com/Redth/MAUI.Sherpa/releases/download/v#{version}/MAUI-Sherpa.macos.zip" + name "MAUI Sherpa" + desc "Desktop app for managing .NET MAUI developer tools" + homepage "https://github.com/Redth/MAUI.Sherpa" + + livecheck do + url :url + strategy :github_latest + end + + depends_on macos: :sequoia + + app "MAUI Sherpa.app" + + zap trash: "~/.maui-sherpa" +end diff --git a/src/MauiSherpa.MacOS/MauiSherpa.MacOS.csproj b/src/MauiSherpa.MacOS/MauiSherpa.MacOS.csproj index d50d4a07..b2991155 100644 --- a/src/MauiSherpa.MacOS/MauiSherpa.MacOS.csproj +++ b/src/MauiSherpa.MacOS/MauiSherpa.MacOS.csproj @@ -9,7 +9,7 @@ enable enable false - 14.0 + 15.0 $(DefineConstants);MACOSAPP MAUI Sherpa diff --git a/src/MauiSherpa/MauiSherpa.csproj b/src/MauiSherpa/MauiSherpa.csproj index 2a06e8e0..7369fda7 100644 --- a/src/MauiSherpa/MauiSherpa.csproj +++ b/src/MauiSherpa/MauiSherpa.csproj @@ -1,8 +1,7 @@ - net10.0-maccatalyst - $(TargetFrameworks);net10.0-windows10.0.19041.0 + net10.0-windows10.0.19041.0 Exe MauiSherpa @@ -19,21 +18,10 @@ $(AppVersion) 1 - 15.0 10.0.17763.0 10.0.17763.0 - - true - Platforms/MacCatalyst/Entitlements.plist - true - - - - Platforms/MacCatalyst/Entitlements.Debug.plist - - $(RuntimeIdentifierOverride) @@ -74,30 +62,6 @@ - - - - <_CopilotMacCatRid Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'Arm64'">maccatalyst-arm64 - <_CopilotMacCatRid Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64'">maccatalyst-x64 - <_CopilotOsxRid Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'Arm64'">osx-arm64 - <_CopilotOsxRid Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64'">osx-x64 - <_CopilotSourceBinary>$(OutDir)runtimes/$(_CopilotOsxRid)/native/copilot - <_CopilotAppBundle>$(OutDir)$(ApplicationTitle).app/Contents/MonoBundle/runtimes/$(_CopilotMacCatRid)/native - - <_CopilotAppBundleOsx>$(OutDir)$(ApplicationTitle).app/Contents/MonoBundle/runtimes/$(_CopilotOsxRid)/native - - - - - - - - - diff --git a/src/MauiSherpa/Platforms/MacCatalyst/AppDelegate.cs b/src/MauiSherpa/Platforms/MacCatalyst/AppDelegate.cs deleted file mode 100644 index 76dc334d..00000000 --- a/src/MauiSherpa/Platforms/MacCatalyst/AppDelegate.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Foundation; - -namespace MauiSherpa; - -[Register("AppDelegate")] -public class AppDelegate : MauiUIApplicationDelegate -{ - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); -} diff --git a/src/MauiSherpa/Platforms/MacCatalyst/Entitlements.Debug.plist b/src/MauiSherpa/Platforms/MacCatalyst/Entitlements.Debug.plist deleted file mode 100644 index c3245042..00000000 --- a/src/MauiSherpa/Platforms/MacCatalyst/Entitlements.Debug.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.network.client - - com.apple.security.network.server - - com.apple.security.get-task-allow - - - diff --git a/src/MauiSherpa/Platforms/MacCatalyst/Entitlements.plist b/src/MauiSherpa/Platforms/MacCatalyst/Entitlements.plist deleted file mode 100644 index 18b01563..00000000 --- a/src/MauiSherpa/Platforms/MacCatalyst/Entitlements.plist +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.network.client - - - diff --git a/src/MauiSherpa/Platforms/MacCatalyst/Info.plist b/src/MauiSherpa/Platforms/MacCatalyst/Info.plist deleted file mode 100644 index e568228e..00000000 --- a/src/MauiSherpa/Platforms/MacCatalyst/Info.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - UIDeviceFamily - - 2 - - LSApplicationCategoryType - public.app-category.developer-tools - UIRequiredDeviceCapabilities - - arm64 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - XSAppIconAssets - Assets.xcassets/appicon.appiconset - UIApplicationSupportsMultipleScenes - - NSLocalNetworkUsageDescription - MAUI Sherpa uses the local network to discover connected devices and communicate with development tools. - - diff --git a/src/MauiSherpa/Platforms/MacCatalyst/Program.cs b/src/MauiSherpa/Platforms/MacCatalyst/Program.cs deleted file mode 100644 index 21565d1c..00000000 --- a/src/MauiSherpa/Platforms/MacCatalyst/Program.cs +++ /dev/null @@ -1,12 +0,0 @@ -using ObjCRuntime; -using UIKit; - -namespace MauiSherpa; - -public class Program -{ - static void Main(string[] args) - { - UIApplication.Main(args, null, typeof(AppDelegate)); - } -} diff --git a/src/MauiSherpa/Platforms/MacCatalyst/SafeAreaAwareViewController.cs b/src/MauiSherpa/Platforms/MacCatalyst/SafeAreaAwareViewController.cs deleted file mode 100644 index 6f3ecb38..00000000 --- a/src/MauiSherpa/Platforms/MacCatalyst/SafeAreaAwareViewController.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Microsoft.Maui.Platform; - -namespace MauiSherpa; - -public class SafeAreaAwarePageViewController : PageViewController -{ - public SafeAreaAwarePageViewController(IView page, IMauiContext mauiContext) : base(page, mauiContext) - { - this._page = page; - } - - readonly IView _page; - - public override void ViewSafeAreaInsetsDidChange() - { - base.ViewSafeAreaInsetsDidChange(); - - if (OperatingSystem.IsIOSVersionAtLeast(11) || OperatingSystem.IsMacCatalystVersionAtLeast(10, 15)) - { - if (_page is Page page) - { - var window = CurrentPlatformView?.Window; - - if (window?.RootViewController?.AdditionalSafeAreaInsets.Top == 0 && window.SafeAreaInsets.Top > 0) - { - window.RootViewController.AdditionalSafeAreaInsets = new UIKit.UIEdgeInsets(-window.SafeAreaInsets.Top, 0, 0, 0); - window.RootViewController.View?.SetNeedsLayout(); - } - } - } - } -} \ No newline at end of file