Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
76 lines (65 loc) · 1.81 KB
/
Copy pathTaskfile.yml
File metadata and controls
76 lines (65 loc) · 1.81 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
version: '3'
vars:
VERSION: '0.2.0'
BUILD_DIR: 'build'
APP_NAME: 'notify.app'
BINARY_NAME: 'notify'
tasks:
default:
desc: Build the project
deps: [build]
help:
desc: Show available tasks
cmds:
- task --list
clean:
desc: Remove build artifacts
cmds:
- echo "🧹 Cleaning build artifacts..."
- rm -rf {{.BUILD_DIR}}
- rm -rf .build
build:
desc: Build the app bundle
cmds:
- echo "🔨 Building {{.BINARY_NAME}} v{{.VERSION}}..."
- ./build.sh
test:
desc: Run tests
cmds:
- echo "🧪 Running tests..."
- swift test
test-parallel:
desc: Run tests in parallel
cmds:
- swift test --parallel
install:
desc: Build and install to /Applications
deps: [build]
cmds:
- echo "📦 Installing {{.APP_NAME}}..."
- sudo rm -rf "/Applications/{{.APP_NAME}}"
- sudo cp -R "{{.BUILD_DIR}}/{{.APP_NAME}}" "/Applications/"
- sudo mkdir -p /usr/local/bin
- sudo ln -sf "/Applications/{{.APP_NAME}}/Contents/MacOS/{{.BINARY_NAME}}" "/usr/local/bin/{{.BINARY_NAME}}"
- echo "✅ Installation complete!"
uninstall:
desc: Uninstall from /Applications
cmds:
- echo "🗑️ Uninstalling {{.APP_NAME}}..."
- sudo rm -rf "/Applications/{{.APP_NAME}}"
- sudo rm -f "/usr/local/bin/{{.BINARY_NAME}}"
- echo "✅ Uninstallation complete!"
release:
desc: Clean build and create release archive
deps: [clean, build]
cmds:
- echo "📦 Creating release archive..."
- cd {{.BUILD_DIR}} && tar -czf "{{.BINARY_NAME}}-{{.VERSION}}-darwin.tar.gz" "{{.APP_NAME}}"
- echo "✅ Release archive created"
ci:
desc: Run full CI pipeline
cmds:
- task clean
- task test
- task build
- echo "🎉 CI pipeline completed!"