forked from FlineDev/BartyCrouch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeak.swift
29 lines (24 loc) · 1 KB
/
beak.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
// beak: kareman/SwiftShell @ .upToNextMajor(from: "4.1.2")
// beak: Flinesoft/HandySwift @ .upToNextMajor(from: "2.7.0")
import HandySwift
import Foundation
import SwiftShell
// MARK: - Tasks
/// Installs project dependencies.
public func installDependencies() throws {
let spmCommand = "swift package resolve"
print("Installing dependencies via SPM: '\(spmCommand)'")
try runAndPrint(bash: spmCommand)
let carthageCommand = "carthage bootstrap --platform macOS --cache-builds"
print("Installing dependencies via Carthage: '\(carthageCommand)'")
try runAndPrint(bash: carthageCommand)
}
/// Updates project dependencies.
public func updateDependencies() throws {
let spmCommand = "swift package update"
print("Updating dependencies via SPM: '\(spmCommand)'")
try runAndPrint(bash: spmCommand)
let carthageCommand = "carthage update --platform macOS --cache-builds"
print("Updating dependencies via Carthage: '\(carthageCommand)'")
try runAndPrint(bash: carthageCommand)
}