-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
44 lines (39 loc) · 1.35 KB
/
Copy pathJustfile
File metadata and controls
44 lines (39 loc) · 1.35 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
project := "TabBuddy"
scheme := "TabBuddy"
config := "Release"
export_dir := "build/export"
archive := "build/TabBuddy.xcarchive"
# Run the app in debug mode
run:
xcodebuild -project {{project}}.xcodeproj \
-scheme {{scheme}} \
-configuration Debug \
-destination 'platform=macOS' \
build
open "$(xcodebuild -project {{project}}.xcodeproj \
-scheme {{scheme}} \
-configuration Debug \
-showBuildSettings 2>/dev/null \
| awk '/BUILT_PRODUCTS_DIR/{dir=$3} /WRAPPER_NAME/{name=$3} END{print dir"/"name}')"
# Archive and export the app for distribution
release: _archive _export
@echo "Done → {{export_dir}}/{{project}}.app"
# Build an xcarchive
_archive:
mkdir -p build
xcodebuild archive \
-project {{project}}.xcodeproj \
-scheme {{scheme}} \
-configuration {{config}} \
-archivePath {{archive}}
# Export the archive
_export:
mkdir -p {{export_dir}}
xcodebuild -exportArchive \
-archivePath {{archive}} \
-exportPath {{export_dir}} \
-exportOptionsPlist ExportOptions.plist
# Clean build artifacts
clean:
rm -rf build
xcodebuild clean -project {{project}}.xcodeproj -scheme {{scheme}}