Skip to content

Commit

Permalink
Maintenance (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
henrik-dmg authored Apr 13, 2023
1 parent 96b2eb9 commit 016feb6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@ name: Swift

on:
push:
branches: [ master ]
branches: [main]
pull_request:
branches: [ master ]
branches: [main]

jobs:
build:

runs-on: macos-latest

steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/checkout@v2
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v
- name: Checkout code
uses: actions/checkout@v3
- name: Build package
run: swift build -v
- name: Run tests
run: swift test -v
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/apple/swift-argument-parser",
"state": {
"branch": null,
"revision": "92646c0cdbaca076c8d3d0207891785b3379cbff",
"version": "0.3.1"
"revision": "fee6933f37fde9a5e12a1e4aeaa93fe60116ff2a",
"version": "1.2.2"
}
}
]
Expand Down
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -16,12 +16,12 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", from: "0.3.0")
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.0")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
.executableTarget(
name: "SwiftGenStrings",
dependencies: [
"SwiftGenStringsCore",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import ArgumentParser
import Foundation
import SwiftGenStringsCore

@main
struct SwiftGenStrings: ParsableCommand {

// MARK: - Configuration

private static var abstract = """
SwiftGenStrings is a command line application that can be used as a drop-in replacement for the standard genstrings command for Swift sources.
The latter only supports the short form of the NSLocalizedString function but breaks as soon as you use any parameters other than key and comment as in
Expand All @@ -12,10 +15,12 @@ struct SwiftGenStrings: ParsableCommand {
static let configuration = CommandConfiguration(
commandName: "SwiftGenStrings",
abstract: SwiftGenStrings.abstract,
version: "0.0.2",
version: "0.1.0",
helpNames: .shortAndLong
)

// MARK: - Arguments and Options

@Argument(help: "List of files, that are used as source of Localizable.strings generation.")
var files: [URL]

Expand All @@ -25,6 +30,8 @@ struct SwiftGenStrings: ParsableCommand {
@Option(name: .short, help: "(Optional) Specifies what directory Localizable.strings table is created in. Not specifying output directory will print script output content to standard output (console).")
var outputDirectory: URL?

// MARK: - Processing

func run() throws {
do {
try ky_run()
Expand Down Expand Up @@ -68,5 +75,3 @@ struct SwiftGenStrings: ParsableCommand {
}

}

SwiftGenStrings.main()

0 comments on commit 016feb6

Please sign in to comment.