Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83cb12eddc | ||
|
|
9b5031aff2 |
@@ -79,6 +79,20 @@ ad-hoc signing (`-`) if none is present. `LSUIElement` is true → no Dock icon.
|
|||||||
Bump `CFBundleShortVersionString`/`CFBundleVersion` via the `build-app.sh`
|
Bump `CFBundleShortVersionString`/`CFBundleVersion` via the `build-app.sh`
|
||||||
version argument and pass the same version to `release.sh`.
|
version argument and pass the same version to `release.sh`.
|
||||||
|
|
||||||
|
## Release process
|
||||||
|
|
||||||
|
1. `./release.sh <version>` — builds, zips `SimpleTopBar.app` to
|
||||||
|
`dist/SimpleTopBar.zip`, and prints its sha256 (it does not tag or upload).
|
||||||
|
2. Commit and push `main`.
|
||||||
|
3. `tea releases create --tag v<version> --asset dist/SimpleTopBar.zip --repo TZGyn/simpletopbar --login gitea.tzgyn.dev`.
|
||||||
|
4. Bump `version`/`sha256` in `~/.cache/homebrew-tap/Casks/simpletopbar.rb`,
|
||||||
|
push, then `git -C /opt/homebrew/Library/Taps/tzgyn/homebrew-tap pull --ff-only`.
|
||||||
|
|
||||||
|
**Always print the upgrade script after any release or version bump** — the user
|
||||||
|
wants it in the final answer every time. Keep it to the cask upgrade commands
|
||||||
|
(see the README release section for the exact block), because the app is
|
||||||
|
installed through the tap.
|
||||||
|
|
||||||
## Gotchas
|
## Gotchas
|
||||||
|
|
||||||
- `AppListModel` is `@MainActor`; the `NSWorkspace` observers hop back with
|
- `AppListModel` is `@MainActor`; the `NSWorkspace` observers hop back with
|
||||||
|
|||||||
@@ -44,14 +44,27 @@ brew install --cask simpletopbar
|
|||||||
The tap is hosted on Gitea, so the full URL is required. Homebrew may print an
|
The tap is hosted on Gitea, so the full URL is required. Homebrew may print an
|
||||||
"Unsupported tap" warning — it's harmless.
|
"Unsupported tap" warning — it's harmless.
|
||||||
|
|
||||||
|
## Upgrade
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew update
|
||||||
|
brew upgrade --cask simpletopbar
|
||||||
|
```
|
||||||
|
|
||||||
|
If Gatekeeper still blocks the app after upgrading (it is not notarized yet):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
xattr -dr com.apple.quarantine /Applications/SimpleTopBar.app
|
||||||
|
```
|
||||||
|
|
||||||
## Build from source
|
## Build from source
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
swift build # debug build
|
swift build # debug build
|
||||||
swift run SimpleTopBar # run from terminal (app appears in the menu bar)
|
swift run SimpleTopBar # run from terminal (app appears in the menu bar)
|
||||||
swift run SimpleTopBar --self-test # headless check of the dropdown logic
|
swift run SimpleTopBar --self-test # headless check of the dropdown logic
|
||||||
./build-app.sh 0.1.0 # release build + SimpleTopBar.app bundle + icon + codesign
|
./build-app.sh 0.2.0 # release build + SimpleTopBar.app bundle + icon + codesign
|
||||||
./release.sh 0.1.0 # build-app.sh + dist/SimpleTopBar.zip + sha256
|
./release.sh 0.2.0 # build-app.sh + dist/SimpleTopBar.zip + sha256
|
||||||
```
|
```
|
||||||
|
|
||||||
## Around the Background dropdown
|
## Around the Background dropdown
|
||||||
|
|||||||
@@ -37,6 +37,15 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
|
|||||||
AppListModel.shared.start()
|
AppListModel.shared.start()
|
||||||
MenuBarItemManager.shared.start()
|
MenuBarItemManager.shared.start()
|
||||||
MenuBarHider.shared.prepare()
|
MenuBarHider.shared.prepare()
|
||||||
|
|
||||||
|
// The tray is empty without Accessibility permission, so surface the
|
||||||
|
// system prompt once at launch instead of waiting for the user to
|
||||||
|
// open the panel and find the button.
|
||||||
|
if !AccessibilityPermission.isGranted,
|
||||||
|
!UserDefaults.standard.bool(forKey: "didRequestAccessibility") {
|
||||||
|
UserDefaults.standard.set(true, forKey: "didRequestAccessibility")
|
||||||
|
AccessibilityPermission.request()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func applicationWillTerminate(_ notification: Notification) {
|
func applicationWillTerminate(_ notification: Notification) {
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
VERSION="${1:-0.2.0}"
|
VERSION="${1:-0.2.1}"
|
||||||
|
|
||||||
swift build -c release
|
swift build -c release
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user