generated from element-hq/.github
-
Notifications
You must be signed in to change notification settings - Fork 118
/
Copy pathSetupProject.swift
30 lines (24 loc) · 960 Bytes
/
SetupProject.swift
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
import ArgumentParser
import CommandLineTools
import Foundation
struct SetupProject: ParsableCommand {
static var configuration = CommandConfiguration(abstract: "A tool to setup the required components to efficiently run and contribute to Element X iOS")
func run() throws {
try setupGitHooks()
try brewInstall()
try mintPackagesInstall()
try xcodegen()
}
func setupGitHooks() throws {
try Zsh.run(command: "git config core.hooksPath .githooks")
}
func brewInstall() throws {
try Zsh.run(command: "brew install xcodegen swiftgen swiftformat git-lfs sourcery mint kiliankoe/formulae/swift-outdated localazy/tools/localazy peripheryapp/periphery/periphery FelixHerrmann/tap/swift-package-list")
}
func mintPackagesInstall() throws {
try Zsh.run(command: "mint install Asana/locheck")
}
func xcodegen() throws {
try Zsh.run(command: "xcodegen")
}
}