mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00

* 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>
24 lines
1006 B
Swift
24 lines
1006 B
Swift
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)")
|
|
}
|
|
}
|