Marfa for Mac is a native macOS app for the items in a Marfa server. Its editor is built on Inkkit.
- macOS 27 and Xcode 27
- A Marfa server to connect to
xcodebuild -project MarfaMac.xcodeproj -scheme MarfaMac -destination 'platform=macOS' -derivedDataPath build testThis builds the app and runs the unit tests. A pull request runs no Mac job in CI, because GitHub lets the organization run only 5 macOS jobs at once. .github/workflows/main.yml compiles Release and runs the unit tests after each merge to main. CI runs no UI tests. Run the build and the tests you need locally before you merge; MarfaMacTests/AGENTS.md lists the commands. To run the app, open MarfaMac.xcodeproj in Xcode and run the MarfaMac scheme.
A checkout builds without a developer account and signs to run locally. Config/Signing.xcconfig, the project's base configuration, leaves each of the settings below empty and includes the ignored Config/Local.xcconfig.
- The Debug configurations leave the hardened runtime off and Release keeps it. Under the hardened runtime, an app signed to run locally refuses to load Sparkle, which is signed the same way, because library validation accepts no locally signed library. Xcode turns the runtime off for such a build itself only when it is not optimized.
- To sign with a team, write
DEVELOPMENT_TEAM = <team ID>intoConfig/Local.xcconfig. The repository holds no tool for keeping that line. - To send errors and timings (
MarfaMac/Model/Telemetry/Reporting.swift), writeMARFA_MAC_POSTHOG_HOSTandMARFA_MAC_POSTHOG_PROJECT_TOKENintoConfig/Local.xcconfigthe same way.Info.plistcarries them into the build; a build without both sends nothing. - To make a build that updates itself, write
MARFA_MAC_UPDATE_FEED_URL(the address of the appcast) andMARFA_MAC_UPDATE_PUBLIC_KEY(the public half of the Sparkle signing key) the same way. A build without both has no updater, no Check for Updates… and no Updates section in Settings, so a local build never offers to replace itself. In an xcconfig file, write the://of an address as:/$()/, since//starts a comment. - Never commit a team identifier, a report setting or an update setting.
The release workflow writes Config/Local.xcconfig for a release build from the values of its environment.
A tag publishes a release. In the workflow .github/workflows/release.yml, the build job builds the app, signs it with a Developer ID, notarizes and staples it, packs it in a disk image that it signs, notarizes and staples too, and signs the image for Sparkle. It then creates the GitHub release, uploads the disk image and the appcast to https://downloads.withmarfa.com/marfa-mac/, and checks that each file is served as uploaded. The app updates itself from that appcast through Sparkle.
- A version exists only as a git tag:
vfollowed by three numbers, such asv0.0.59. Every version is0.0.xuntil the first public release, and each release is the latest release tag plus0.0.1. - A release candidate is a tag with
-rcand a number from 1 to 98 after the version it is a candidate for, such asv0.0.59-rc1, then-rc2. It builds as version 0.0.59. - A candidate goes to the beta channel: only people who turn on Beta Versions in Settings > General > Updates are offered it. A release goes to everyone, and to the website's download,
Marfa.dmg. A candidate is never counted as the latest release tag. - The build number comes from the tag, so nothing is written into a file:
X*10000000 + Y*100000 + Z*100 + Nfor the candidatevX.Y.Z-rcN, and the same with 99 for N for the releasevX.Y.Z.v0.0.59-rc1builds as 5901 andv0.0.59as 5999. Sparkle compares build numbers, so a candidate is older than its release, and a rebuilt tag keeps its number.MARKETING_VERSIONstays0.0.0in the repository. - The release notes list what a person notices since the tag before (the last release, for a release): each
feat,fixandperfpull request's title, under New, Fixed and Faster. Other types, and scopes such asciandrelease, are left out, and so are names and pull request numbers (Scripts/release/release_notes.py). Write a title as the person should read it. - The workflow refuses a tag that is not that shape, that would build version 0.0.0, or that is not on the history of
main. - Tag soon after any merge to
mainthat changes what a person sees or does. Take the next candidate of the next version by default. Cut the release itself (v0.0.59) when a candidate has been tried, when a logical set of work is complete, or when the brief says so. Merges that change only tests, CI, docs, or notes are not tagged. Try a choice in a local build first, because a release is installed on every Mac that checks for updates.
-
Merge the work into
main. -
Tag the merged commit and push the tag:
git tag v0.0.59-rc1 <commit> git push origin v0.0.59-rc1
-
Check the release, as described below.
To rebuild a tag, re-run its workflow run. The run replaces the disk image and the notes on the GitHub release, and the tag's item in the appcast.
-
In GitHub, open the Actions tab and check that the Release run for the tag has finished. Its
buildjob signs and notarizes, and itspublishjob releases and uploads. -
Open the repository's Releases page. The release for the tag lists the disk image, and a candidate is marked as a pre-release.
-
Fetch the appcast and look for the tag's item at the top. A candidate's item has
<sparkle:channel>beta</sparkle:channel>; a release's item has no channel:curl -s https://downloads.withmarfa.com/marfa-mac/appcast.xml | head -40 -
To try the update, run an older build that carries a feed, choose Marfa > Check for Updates…, and install the new version.
A ready pull request that changes .github/workflows/release.yml, Scripts/release/, MarfaMac/Info.plist or Config/ runs the dry run. You can also run it manually. It archives with ad hoc signing, makes the disk image, signs it with a throwaway Sparkle key and builds an appcast from a fixture feed. It skips Developer ID export, notarization and publishing. It reads no release secrets and uploads the disk image and appcast as the dry-run artifact. A tag run stops if the environment lacks any value it needs.
Scripts/release/ holds the steps the workflow runs, each of which you can read on its own. The tag and the appcast are handled by Python 3 scripts with unit tests:
python3 -m unittest discover -s Scripts/releaseAGENTS.md has the conventions and says which page of docs/ to read before you change each part of the app.
Apache-2.0. editor/src/style.css is adapted from another project and keeps its own MIT notice. MarfaMac/Views/Reader/ holds Mozilla Readability 0.6.0, unmodified and under the Apache-2.0 license; READABILITY-NOTICE.txt there has its notice and how to update it.