Skip to content

Commit a00ab63

Browse files
zakery292claude
andcommitted
Add quit button to tray menu and fix CI version stamping
CI now sets MARKETING_VERSION from the git tag and CURRENT_PROJECT_VERSION from the run number so builds are no longer stuck at 1.1.0. Added "Quit Task Visualiser" button to the menu bar tray. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 047b654 commit a00ab63

2 files changed

Lines changed: 23 additions & 3 deletions

File tree

.github/workflows/build-unsandboxed.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@ jobs:
2222
id: version
2323
run: |
2424
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
25-
echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
26-
echo "version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"
25+
TAG="${GITHUB_REF#refs/tags/}"
26+
VER="${TAG#v}"
27+
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
28+
echo "version=$VER" >> "$GITHUB_OUTPUT"
29+
# Build number from run number for unique, ascending builds
30+
echo "build=${{ github.run_number }}" >> "$GITHUB_OUTPUT"
2731
else
2832
echo "tag=" >> "$GITHUB_OUTPUT"
2933
echo "version=dev-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
34+
echo "build=${{ github.run_number }}" >> "$GITHUB_OUTPUT"
3035
fi
3136
3237
- name: Select Xcode
@@ -78,6 +83,12 @@ jobs:
7883
7984
- name: Build archive
8085
run: |
86+
# Set marketing version from tag (e.g. 1.2.1) or fall back to project default
87+
MKTG_VER="${{ steps.version.outputs.version }}"
88+
if [[ "$MKTG_VER" == dev-* ]]; then
89+
MKTG_VER=""
90+
fi
91+
8192
xcodebuild archive \
8293
-project "Task Visualiser.xcodeproj" \
8394
-scheme "Task Visualiser" \
@@ -92,7 +103,9 @@ jobs:
92103
DEVELOPMENT_TEAM=4YUJN363G6 \
93104
PROVISIONING_PROFILE_SPECIFIER="" \
94105
SKIP_INSTALL=NO \
95-
BUILD_LIBRARY_FOR_DISTRIBUTION=NO
106+
BUILD_LIBRARY_FOR_DISTRIBUTION=NO \
107+
${MKTG_VER:+MARKETING_VERSION="$MKTG_VER"} \
108+
CURRENT_PROJECT_VERSION="${{ steps.version.outputs.build }}"
96109
97110
- name: Export app
98111
run: |

Task Visualiser/Views/MenuBar/MenuBarView.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,13 @@ struct MenuBarView: View {
222222
}
223223
.buttonStyle(.link)
224224

225+
Button {
226+
NSApp.terminate(nil)
227+
} label: {
228+
Label("Quit Task Visualiser", systemImage: "power")
229+
}
230+
.buttonStyle(.link)
231+
225232
Divider()
226233

227234
BrandingFooterView(compact: true)

0 commit comments

Comments
 (0)