-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Taskfile.yml
114 lines (113 loc) · 3.2 KB
/
Taskfile.yml
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
version: '3'
tasks:
build:
cmds:
- task: build:macOS
- task: build:iPadOS
build:general: xcodebuild -scheme Moc build
build:macOS: xcodebuild -scheme Moc -sdk macosx build
build:iPadOS: xcodebuild -scheme Moc -sdk iphoneos build
release:
cmds:
- task: release:macOS
- task: release:iPadOS
release:general: xcodebuild -scheme Moc -configuration Release build
release:macOS: xcodebuild -scheme Moc -sdk macosx -configuration Release build
release:iPadOS: xcodebuild -scheme Moc -sdk iphoneos -configuration Release build
clean: xcodebuild -scheme Moc clean
archive:
cmds:
- task: archive:macOS
- task: archive:iPadOS
- task: package:iPadOS
archive:macOS:
cmds:
- xcodebuild -scheme Moc archive -configuration release -sdk macosx -archivePath $ARCHIVE_PATH
env:
ARCHIVE_PATH: result/Moc-macOS.xcarchive
archive:iPadOS:
cmds:
- xcodebuild -scheme Moc archive -configuration release -sdk iphoneos -archivePath $ARCHIVE_PATH
env:
ARCHIVE_PATH: result/Moc-iPadOS.xcarchive
package:
cmds:
- task: package:macOS
- task: package:iPadOS
package:macOS:
cmds:
- mkdir -p dmgsrc
- cp -r $APP_PATH dmgsrc
- mkdir -p result
- hdiutil create -volname Moc -srcfolder dmgsrc -ov -format UDZO $DMG_PATH
- rm -rf dmgsrc
env:
APP_PATH: result/Moc-macOS.xcarchive/Products/Applications/Moc.app
DMG_PATH: result/Moc.dmg
package:iPadOS:
cmds:
- xcodebuild -exportArchive -archivePath $ARCHIVE_PATH \
-exportOptionsPlist iPadOS-export-options.plist \
-exportPath $IPA_PATH
env:
ARCHIVE_PATH: result/Moc-iPadOS.xcarchive
IPA_PATH: result/Moc.ipa
setup:
cmds:
- task: install-cli-deps
- task: generate
setup:full:
cmds:
- task: setup
- task: fetch-spm-packages
- task: xcode
teardown:
cmds:
- brew uninstall swift-sh
- brew uninstall swiftlint
- brew uninstall ggoraa/apps/gyb
- brew uninstall swiftgen
- brew uninstall sourcery
- rm -rf Sources/Utilities/Generated
- rm -rf Moc/Generated
install-cli-deps:
cmds:
- brew install swift-sh
- brew install swiftlint
- brew install ggoraa/apps/gyb
- brew install swiftgen
- brew install sourcery
fetch-spm-packages:
aliases: [fetch-spm, fspmp]
cmds:
- xcodebuild -resolvePackageDependencies
generate:
cmds:
- task: generate:gyb
- task: generate:sourcery
generate:gyb:
env:
# Default values for macOS Telegram client
API_ID: 2834
API_HASH: 68875f756c9b437a8b916ca3de215815
MACOS_APP_CENTER_SECRET: ""
IPADOS_APP_CENTER_SECRET: ""
cmds:
- cmd: ./scripts/gyb.sh
ignore_error: true
generate:sourcery:
cmds:
- ./scripts/sourcery.sh
docs:build:
cmds:
- xcodebuild docbuild -scheme Moc
docs:find-archive:
cmds:
- find ~/Library/Developer/Xcode/DerivedData/Moc-* -type d -name '*.doccarchive'
l10n:export:
cmds:
- xcodebuild -exportLocalizations -project Moc -localizationPath l10nExport
test:
cmds:
- echo "To be implemented"
xcode: open Moc.xcodeproj