-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.dist.yaml
More file actions
116 lines (97 loc) · 3.57 KB
/
Taskfile.dist.yaml
File metadata and controls
116 lines (97 loc) · 3.57 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
---
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
dotenv: [.env]
vars:
PROJECT: Appresize.xcodeproj
SCHEME: Appresize
BUILD_DIR: build
CONFIGURATION_DEBUG: Debug
CONFIGURATION_RELEASE: Release
DESTINATION: "platform=macOS"
tasks:
default:
desc: List available tasks
silent: true
cmds:
- task -l
clean:
desc: Clean build artifacts
cmds:
- /bin/rm -rf "{{.BUILD_DIR}}"
- xcodebuild clean -project "{{.PROJECT}}" -scheme "{{.SCHEME}}"
build:
desc: Build the app (Debug)
cmds:
- xcodebuild -project "{{.PROJECT}}" -scheme "{{.SCHEME}}" -configuration "{{.CONFIGURATION_DEBUG}}" -derivedDataPath "{{.BUILD_DIR}}" build
build:release:
desc: Build the app (Release)
cmds:
- xcodebuild -project "{{.PROJECT}}" -scheme "{{.SCHEME}}" -configuration "{{.CONFIGURATION_RELEASE}}" -derivedDataPath "{{.BUILD_DIR}}" build
test:build:
desc: Build tests
cmds:
- xcodebuild build-for-testing -project "{{.PROJECT}}" -scheme "{{.SCHEME}}" -configuration "{{.CONFIGURATION_DEBUG}}" -derivedDataPath "{{.BUILD_DIR}}" -destination "{{.DESTINATION}}"
test:
desc: Run all tests
deps: [test:build]
cmds:
- xcodebuild test-without-building -project "{{.PROJECT}}" -scheme "{{.SCHEME}}" -configuration "{{.CONFIGURATION_DEBUG}}" -derivedDataPath "{{.BUILD_DIR}}" -destination "{{.DESTINATION}}"
test:unit:
desc: Run unit tests only (excludes tests that require system permissions)
deps: [test:build]
cmds:
- xcodebuild test-without-building -project "{{.PROJECT}}" -scheme "{{.SCHEME}}" -configuration "{{.CONFIGURATION_DEBUG}}" -derivedDataPath "{{.BUILD_DIR}}" -destination "{{.DESTINATION}}" -only-testing:AppresizeTests/ModifierTests
test:all:
desc: Run all tests (may require manual interaction for permissions)
deps: [test:build]
cmds:
- xcodebuild test-without-building -project "{{.PROJECT}}" -scheme "{{.SCHEME}}" -configuration "{{.CONFIGURATION_DEBUG}}" -derivedDataPath "{{.BUILD_DIR}}" -destination "{{.DESTINATION}}" -only-testing:AppresizeTests
run:
desc: Build and run the app (Debug)
deps: [build]
cmds:
- task: open
run:release:
desc: Build and run the app (Release)
deps: [build:release]
cmds:
- task: open:release
copy:release:
desc: Move the built app release to the Applications folder
deps: [build:release]
cmds:
- cp -r "{{.BUILD_DIR}}/Build/Products/{{.CONFIGURATION_RELEASE}}/Appresize.app" /Applications/Appresize.app
open:
desc: Run the built app (Debug)
cmds:
- open "{{.BUILD_DIR}}/Build/Products/{{.CONFIGURATION_DEBUG}}/Appresize.app"
open:release:
desc: Run the built app (Release)
cmds:
- open "{{.BUILD_DIR}}/Build/Products/{{.CONFIGURATION_RELEASE}}/Appresize.app"
archive:
desc: Create an archive for distribution
cmds:
- xcodebuild archive -project "{{.PROJECT}}" -scheme "{{.SCHEME}}" -configuration "{{.CONFIGURATION_RELEASE}}" -derivedDataPath "{{.BUILD_DIR}}" -archivePath "{{.BUILD_DIR}}/Appresize.xcarchive"
dev:
desc: Quick development cycle (clean, build, test)
cmds:
- task: clean
- task: build
- task: test
ci:
desc: Full CI pipeline (build both configs, test)
cmds:
- task: clean
- task: build
- task: build:release
- task: test
info:
desc: Show project information
silent: true
cmds:
- "echo 'Project: {{.PROJECT}}'"
- "echo 'Scheme: {{.SCHEME}}'"
- "echo 'Build Directory: {{.BUILD_DIR}}'"
- xcodebuild -version