Dpendencies update + improved dependencies version management (#721)
* updating dependencies * minor version pinning * update completed and also added a tool that checks for outdated swiftpm packages * changelog * DTCoreText uses exact version * minor version for analytics * pushing OutdatedPackages * package.swift for the repo also using upToNextMinor * fixing a typo * Update Tools/Sources/OutdatedPackages.swift Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com> * Update Tools/Sources/SetupProject.swift Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com> * removing unused comment * removed trailing comma --------- Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
23
Tools/Sources/OutdatedPackages.swift
Normal file
23
Tools/Sources/OutdatedPackages.swift
Normal file
@@ -0,0 +1,23 @@
|
||||
import ArgumentParser
|
||||
import Foundation
|
||||
|
||||
struct OutdatedPackages: ParsableCommand {
|
||||
static var configuration = CommandConfiguration(abstract: "A tool to check outdated package dependencies. Please make sure you have already run setup-project before using this tool.")
|
||||
|
||||
private var projectSwiftPMDirectoryURL: URL { Utilities.projectDirectoryURL.appending(path: "ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm") }
|
||||
|
||||
func run() throws {
|
||||
try checkToolsDependencies()
|
||||
try checkProjectDependencies()
|
||||
}
|
||||
|
||||
func checkToolsDependencies() throws {
|
||||
guard let output = try Utilities.zsh("swift outdated"), !output.isEmpty else { return }
|
||||
print("outdated tools Swift packages:\n\(output)")
|
||||
}
|
||||
|
||||
func checkProjectDependencies() throws {
|
||||
guard let output = try Utilities.zsh("swift outdated", workingDirectoryURL: projectSwiftPMDirectoryURL), !output.isEmpty else { return }
|
||||
print("outdated project Swift packages:\n\(output)")
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ struct SetupProject: ParsableCommand {
|
||||
}
|
||||
|
||||
func brewBundleInstall() throws {
|
||||
try Utilities.zsh("brew install xcodegen swiftgen swiftlint swiftformat git-lfs sourcery")
|
||||
try Utilities.zsh("brew install xcodegen swiftgen swiftlint swiftformat git-lfs sourcery kiliankoe/formulae/swift-outdated")
|
||||
}
|
||||
|
||||
func xcodegen() throws {
|
||||
|
||||
@@ -5,5 +5,6 @@ import Foundation
|
||||
struct Tools: ParsableCommand {
|
||||
static var configuration = CommandConfiguration(abstract: "A collection of command line tools for ElementX",
|
||||
subcommands: [BuildSDK.self,
|
||||
SetupProject.self])
|
||||
SetupProject.self,
|
||||
OutdatedPackages.self])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user