diff --git a/Makefile b/Makefile index e9fd4afd..7a15515c 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,6 @@ override ROOT := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) override DIST := $(ROOT)/dist override GUEST_DIST := $(DIST)/guest override APP := $(DIST)/app.noindex/Try Omarchy.app -override DMG := $(DIST)/TryOmarchy.dmg override BUILD_CACHE := $(ROOT)/scripts/build-cache.py override BUILD_STATE := $(ROOT)/.build/state RELEASE_SIGN_IDENTITY ?= Developer ID Application: Eduardo Martinez (RZC79MPD34) diff --git a/README.md b/README.md index 354757cf..8fc12985 100644 --- a/README.md +++ b/README.md @@ -902,11 +902,11 @@ All generated output has one predictable home: ```text dist/ ├── app.noindex/ -│ └── Try Omarchy.app # development identity +│ └── Try Omarchy.app # development identity ├── release.noindex/ -│ └── Try Omarchy.app # production identity -├── TryOmarchy.dmg # after make package or make release -└── guest/ # verified guest build artifacts +│ └── Try Omarchy.app # production identity +├── TryOmarchy-vX.Y.Z.dmg # after make package or make release +└── guest/ # verified guest build artifacts ``` Both DMG targets create distributable artifacts: diff --git a/docs/app-updates.md b/docs/app-updates.md index 64d072bf..c7b4bc45 100644 --- a/docs/app-updates.md +++ b/docs/app-updates.md @@ -25,7 +25,8 @@ Updates window also counts as its notification. The checker uses GitHub's public `/repos/omacom/try-omarchy/releases/latest` endpoint without credentials. It accepts published, non-prerelease `vX.Y.Z` -tags with an uploaded `TryOmarchy.dmg`. Versions compare numerically. The +tags with an uploaded `TryOmarchy-vX.Y.Z.dmg` whose version matches the tag, +or the legacy `TryOmarchy.dmg`. Versions compare numerically. The download action opens the project's release page so the user can read notes and OS requirements. GitHub release metadata does not declare a structured minimum macOS version; this stage does not claim compatibility or select an diff --git a/docs/releasing.md b/docs/releasing.md index de22dec4..b89cd162 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -21,7 +21,12 @@ not make the checkout dirty. After verifying the DMG, push the tag with `git push origin vX.Y.Z`, then create the GitHub release manually using that existing tag and attach -`dist/TryOmarchy.dmg`. Packaging does not create tags or publish GitHub releases. +`dist/TryOmarchy-vX.Y.Z.dmg`. The filename uses the version stamped into the +app from the release tag (for example, `v0.4.0` produces +`TryOmarchy-v0.4.0.dmg`). Packaging does not create tags or publish GitHub releases. + +Older app release checkers recognize only `TryOmarchy.dmg`. To keep a release +discoverable by those clients, also upload a copy under that legacy asset name. When the release updates Omarchy itself, first run: @@ -35,7 +40,7 @@ before continuing with the normal build and verification sequence. Outputs are written to: - `dist/release.noindex/Try Omarchy.app` (production) -- `dist/TryOmarchy.dmg` +- `dist/TryOmarchy-vX.Y.Z.dmg` - `dist/guest/` `make package` and `make release` both create distributable builds: they sign diff --git a/macos/README.md b/macos/README.md index 46c150dd..44ed76b8 100644 --- a/macos/README.md +++ b/macos/README.md @@ -12,8 +12,8 @@ Use the root Makefile for normal development: make runtime # macos/.build/qemu-gpu-runtime make app # dist/app.noindex/Try Omarchy.app make run -make package # signed and notarized dist/TryOmarchy.dmg -make release # signed and notarized dist/TryOmarchy.dmg +make package # signed and notarized dist/TryOmarchy-vX.Y.Z.dmg +make release # signed and notarized dist/TryOmarchy-vX.Y.Z.dmg make test ``` diff --git a/macos/Sources/OmarchyVMHelper/AppRelease.swift b/macos/Sources/OmarchyVMHelper/AppRelease.swift index 01d466c4..98e4b612 100644 --- a/macos/Sources/OmarchyVMHelper/AppRelease.swift +++ b/macos/Sources/OmarchyVMHelper/AppRelease.swift @@ -59,7 +59,10 @@ struct AppRelease: Equatable { let payload = try JSONDecoder().decode(Payload.self, from: data) guard !payload.draft, !payload.prerelease, payload.tagName.hasPrefix("v"), let version = AppReleaseVersion(String(payload.tagName.dropFirst())), - payload.assets.contains(where: { $0.name == "TryOmarchy.dmg" && $0.state == "uploaded" }) else { + payload.assets.contains(where: { + ($0.name == "TryOmarchy-v\(version).dmg" || $0.name == "TryOmarchy.dmg") + && $0.state == "uploaded" + }) else { throw AppReleaseError.invalidRelease } // Construct the project URL instead of opening an arbitrary URL from JSON. diff --git a/macos/Tests/OmarchyVMHelperTests/AppReleaseTests.swift b/macos/Tests/OmarchyVMHelperTests/AppReleaseTests.swift index d1544560..db04fc8a 100644 --- a/macos/Tests/OmarchyVMHelperTests/AppReleaseTests.swift +++ b/macos/Tests/OmarchyVMHelperTests/AppReleaseTests.swift @@ -64,12 +64,23 @@ struct AppReleaseTests { try payload(draft: true), try payload(prerelease: true), try payload(tag: "v0.5.0-beta"), try payload(tag: "0.5.0"), try payload(assetName: "source.zip"), try payload(assetState: "starter"), + try payload(assetName: "TryOmarchy-v0.4.0.dmg"), + try payload(assetName: "TryOmarchy-v0.5.0.dmg", assetState: "starter"), ] { #expect(throws: AppReleaseError.self) { try AppRelease.decode(data) } } #expect(throws: DecodingError.self) { try AppRelease.decode(Data("{}".utf8)) } } + @Test("release downloads accept matching versioned names and legacy names", arguments: [ + "TryOmarchy-v0.5.0.dmg", "TryOmarchy.dmg", + ]) + func releaseDownloadNames(assetName: String) throws { + let latest = try AppRelease.decode(payload(assetName: assetName)) + #expect(latest.version == AppReleaseVersion("0.5.0")) + #expect(latest.url.absoluteString == "https://github.com/omacom/try-omarchy/releases/tag/v0.5.0") + } + @Test("current and newer installed builds are not offered a downgrade") func updateDecision() throws { let latest = try release() diff --git a/macos/build-app.sh b/macos/build-app.sh index 05f2e166..b23e0c9c 100755 --- a/macos/build-app.sh +++ b/macos/build-app.sh @@ -349,7 +349,8 @@ codesign --verify --deep --strict --verbose=2 "$app" echo "[native] Built $app" if (( build_dmg )); then - dmg="$repo_dir/dist/TryOmarchy.dmg" + app_version=$(/usr/bin/plutil -extract CFBundleShortVersionString raw "$contents/Info.plist") + dmg="$repo_dir/dist/TryOmarchy-v${app_version}.dmg" rm -f "$dmg" package_options=() if [[ $sign_identity != - ]]; then