Files
letro-ios/Tools/Sources/Commands/DownloadStrings.swift
Doug ea4f1ba9f3 Automatically open a PR to bump the calver (#4167)
* Update our tools package to Swift 6.1

Also improves the package layout with subdirectories 📁

* Update GenerateSDKMocks to be an Async command.

* Add a tool to bump the project CalVer every month.

* Add a workflow to automatically bump the calendar version.

Note: This only does year & month, the patch is handled by the release script.
2025-06-03 17:52:16 +01:00

25 lines
717 B
Swift

import ArgumentParser
import CommandLineTools
import Foundation
struct DownloadStrings: ParsableCommand {
static let configuration = CommandConfiguration(abstract: "A tool to download localizable strings from localazy")
@Flag(help: "Use to download translation keys for all languages")
var allLanguages = false
func run() throws {
try localazyDownload()
try swiftgen()
}
private func localazyDownload() throws {
let arguments = allLanguages ? " all" : ""
try Zsh.run(command: "localazy download\(arguments)")
}
private func swiftgen() throws {
try Zsh.run(command: "swiftgen config run --config Tools/SwiftGen/swiftgen-config.yml")
}
}