-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathmise.toml
More file actions
209 lines (182 loc) · 5.97 KB
/
mise.toml
File metadata and controls
209 lines (182 loc) · 5.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
min_version = "2025.10.0"
[tools]
jq = "latest"
ripgrep = "latest"
fd = "latest"
xcbeautify = "latest"
tmux = "latest"
zig = "0.15.2"
[env]
PROJECT_NAME = "Mori"
DERIVED_DATA = "{{cwd}}/.derived-data"
# ─── Core ────────────────────────────────────────────────────────
[tasks.dev]
description = "Build and run Mori"
depends = ["build"]
run = '''
swift run Mori
'''
[tasks.build]
description = "Debug build"
depends = ["build:ghostty"]
run = '''
set -euo pipefail
swift build --product Mori 2>&1 | xcbeautify
'''
[tasks."build:release"]
description = "Release build"
depends = ["build:ghostty"]
run = '''
set -euo pipefail
swift build -c release --product Mori 2>&1 | xcbeautify
'''
[tasks.test]
description = "Run all tests"
depends = ["test:core", "test:persistence", "test:tmux", "test:ipc", "test:keybindings"]
[tasks."test:core"]
run = "cd Packages/MoriCore && swift run MoriCoreTests"
[tasks."test:persistence"]
run = "cd Packages/MoriPersistence && swift run MoriPersistenceTests"
[tasks."test:tmux"]
run = "cd Packages/MoriTmux && swift run MoriTmuxTests"
[tasks."test:ipc"]
run = "cd Packages/MoriIPC && swift run MoriIPCTests"
[tasks."test:keybindings"]
run = "cd Packages/MoriKeybindings && swift run MoriKeybindingsTests"
[tasks."build:ghostty"]
description = "Build GhosttyKit XCFramework from source"
run = "bash scripts/build-ghostty.sh"
[tasks.bundle]
description = "Build release and create Mori.app bundle"
run = "bash scripts/bundle.sh"
[tasks.clean]
description = "Clean build artifacts"
run = "swift package clean && rm -rf .build .derived-data Mori.app"
# ─── Xcode ───────────────────────────────────────────────────────
[tasks."xcode:build"]
description = "Build via xcodebuild"
run = '''
set -euo pipefail
xcodebuild \
-project "${PROJECT_NAME}.xcodeproj" \
-scheme "$PROJECT_NAME" \
-configuration Debug \
-derivedDataPath "$DERIVED_DATA" \
build 2>&1 | xcbeautify
'''
[tasks."xcode:test"]
description = "Run Xcode tests"
run = '''
set -euo pipefail
xcodebuild \
-project "${PROJECT_NAME}.xcodeproj" \
-scheme "$PROJECT_NAME" \
-derivedDataPath "$DERIVED_DATA" \
test 2>&1 | xcbeautify
'''
[tasks."xcode:generate"]
description = "Generate .xcodeproj from Package.swift"
run = "swift package generate-xcodeproj"
# ─── iOS (MoriRemote) ───────────────────────────────────────────
[tasks."ios:generate"]
description = "Generate MoriRemote.xcodeproj from project.yml"
run = "cd MoriRemote && xcodegen generate"
[tasks."ios:build"]
description = "Build MoriRemote for iOS Simulator"
depends = ["ios:generate"]
run = '''
set -euo pipefail
xcodebuild \
-project MoriRemote/MoriRemote.xcodeproj \
-scheme MoriRemote \
-destination 'generic/platform=iOS Simulator' \
-derivedDataPath "$DERIVED_DATA" \
build 2>&1 | xcbeautify
'''
[tasks."ios:test"]
description = "Build and run MoriRemote tests on iOS Simulator"
depends = ["ios:generate"]
run = '''
set -euo pipefail
SIMULATOR=${MORI_IOS_SIMULATOR:-$(xcrun simctl list devices available | grep -m1 'iPhone' | sed 's/^ *//' | sed 's/ (.*//')}
xcodebuild \
-project MoriRemote/MoriRemote.xcodeproj \
-scheme MoriRemote \
-destination "platform=iOS Simulator,name=$SIMULATOR" \
-derivedDataPath "$DERIVED_DATA" \
test 2>&1 | xcbeautify
'''
[tasks."ios:run"]
description = "Build and launch MoriRemote on iOS Simulator"
depends = ["ios:build"]
run = '''
set -euo pipefail
SIMULATOR=${MORI_IOS_SIMULATOR:-$(xcrun simctl list devices available | grep -m1 'iPhone' | sed 's/^ *//' | sed 's/ (.*//')}
APP_PATH=$(find "$DERIVED_DATA" -name "MoriRemote.app" -path "*/Debug-iphonesimulator/*" | head -1)
if [ -z "$APP_PATH" ]; then
echo "❌ MoriRemote.app not found in derived data"
exit 1
fi
xcrun simctl boot "$SIMULATOR" 2>/dev/null || true
xcrun simctl install "$SIMULATOR" "$APP_PATH"
xcrun simctl launch "$SIMULATOR" "$(plutil -extract CFBundleIdentifier raw "$APP_PATH/Info.plist")"
echo "✅ MoriRemote launched on $SIMULATOR simulator"
'''
[tasks."ios:archive"]
description = "Archive MoriRemote for distribution"
depends = ["ios:generate"]
run = '''
set -euo pipefail
DERIVED_IOS="${DERIVED_DATA}-ios"
ARCHIVE_PATH="${DERIVED_IOS}/MoriRemote.xcarchive"
MARKETING_VERSION="${MARKETING_VERSION:-0.1.0}"
CURRENT_PROJECT_VERSION="${CURRENT_PROJECT_VERSION:-1}"
xcodebuild archive \
-project MoriRemote/MoriRemote.xcodeproj \
-scheme MoriRemote \
-destination 'generic/platform=iOS' \
-archivePath "$ARCHIVE_PATH" \
-derivedDataPath "$DERIVED_IOS" \
MARKETING_VERSION="$MARKETING_VERSION" \
CURRENT_PROJECT_VERSION="$CURRENT_PROJECT_VERSION" \
2>&1 | xcbeautify
echo "✅ Archive created at $ARCHIVE_PATH"
'''
[tasks."ios:export"]
description = "Export IPA from archive"
depends = ["ios:archive"]
run = '''
set -euo pipefail
DERIVED_IOS="${DERIVED_DATA}-ios"
ARCHIVE_PATH="${DERIVED_IOS}/MoriRemote.xcarchive"
EXPORT_DIR="${DERIVED_IOS}/export"
EXPORT_PLIST="${EXPORT_OPTIONS_PLIST:-MoriRemote/ExportOptions.plist}"
if [ ! -f "$EXPORT_PLIST" ]; then
echo "❌ Export options plist not found: $EXPORT_PLIST"
exit 1
fi
xcodebuild -exportArchive \
-archivePath "$ARCHIVE_PATH" \
-exportOptionsPlist "$EXPORT_PLIST" \
-exportPath "$EXPORT_DIR" \
2>&1 | xcbeautify
echo "✅ IPA exported to $EXPORT_DIR"
'''
[tasks."ios:upload"]
description = "Upload IPA to App Store Connect / TestFlight"
run = '''
set -euo pipefail
DERIVED_IOS="${DERIVED_DATA}-ios"
EXPORT_DIR="${DERIVED_IOS}/export"
IPA_PATH=$(find "$EXPORT_DIR" -name "*.ipa" | head -1)
if [ -z "$IPA_PATH" ]; then
echo "❌ No IPA found in $EXPORT_DIR. Run ios:export first."
exit 1
fi
xcrun altool --upload-app \
--type ios \
--file "$IPA_PATH" \
--username "${APPLE_ID}" \
--password "${APPLE_APP_PASSWORD}"
echo "✅ Uploaded $IPA_PATH to App Store Connect"
'''