Beam/Tools/Sources/OutdatedPackages.swift
Mauro 8a56649289
Translations workflow and tools (#768)
* Translations workflow and tools

* improved the name of the workflow

* need this commit to trigger the workflow for the first time

* swift tools can now run on CI

* only strings and stringsdict will be committed

* fixed a workflow issue

* starting the workflow to save it

* fixing downgrade issues

* fixing URL usage

* install localazy

* fixing add-paths typo

* downloaded strings

* removing on push trigger

* Update Tools/Sources/DownloadTranslations.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* Added locheck for string verification

* code formatting improvement

* Update Tools/Sources/Locheck.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* pr suggestion

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-04-05 19:36:51 +02:00

24 lines
1013 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.appendingPathComponent("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)")
}
}