Skip to content

Commit 02cfa69

Browse files
Merge pull request #1 from minuscorp/feature/new-build-system
Feature/new build system
2 parents 34f1901 + 08ab38b commit 02cfa69

File tree

8 files changed

+70
-33
lines changed

8 files changed

+70
-33
lines changed

.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ osx_image: xcode10.2
33

44
script:
55
- set -o pipefail
6-
- swift --version
6+
- swift --version
7+
- make build

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
TOOL_NAME = poe
2+
3+
PREFIX = /usr/local
4+
INSTALL_PATH = $(PREFIX)/bin/$(TOOL_NAME)
5+
BUILD_PATH = .build/release/$(TOOL_NAME)
6+
7+
install: build
8+
install -d "$(PREFIX)/bin"
9+
install -C -m 755 $(BUILD_PATH) $(INSTALL_PATH)
10+
11+
build:
12+
swift build --disable-sandbox -c release
13+
14+
uninstall:
15+
rm -f $(INSTALL_PATH)

POEditor-Parser.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "POEditor-Parser"
4-
s.version = "1.0.0"
4+
s.version = "1.0.1"
55
s.summary = "`POEditor-Parser` generates a swift file with an input strings file from POEditor"
66

77
s.description = <<-DESC

Package.resolved

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ let package = Package(
1111
],
1212
dependencies: [
1313
// Dependencies declare other packages that this package depends on.
14-
.package(url: "https://github.com/kylef/Commander", from: "0.8.0"),
15-
.package(url: "https://github.com/onevcat/Rainbow", from: "3.0.0"),
16-
.package(url: "https://github.com/PerfectlySoft/Perfect-CURL", from: "3.0.0")
14+
.package(url: "https://github.com/kylef/Commander", .upToNextMajor(from: "0.8.0")),
15+
.package(url: "https://github.com/onevcat/Rainbow", .upToNextMajor(from: "3.0.0")),
16+
.package(url: "https://github.com/PerfectlySoft/Perfect-CURL", .upToNextMajor(from: "3.0.0"))
1717
],
1818
targets: [
1919
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
2020
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
2121
.target(
2222
name: "POEditorParser",
2323
dependencies: ["Commander", "Rainbow", "PerfectCURL"])
24-
]
24+
],
25+
swiftLanguageVersions: [.version("4"), .version("4.2")]
2526
)

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,28 @@ A simple generator of swift files from a given localized POeditor `strings` file
1010
[![Build Status](https://travis-ci.org/bq/poeditor-parser-swift.svg?branch=master)](https://travis-ci.org/bq/poeditor-parser-swift)
1111
[![codecov](https://codecov.io/gh/bq/poeditor-parser-swift/branch/master/graph/badge.svg)](https://codecov.io/gh/bq/poeditor-parser-swift)
1212

13-
## Usage
13+
## Installation
1414

15-
```ogdl
16-
/bin/poe $APITOKEN $PROJECTID $LANGUAGE
1715
```
16+
$ make
17+
```
18+
19+
## Usage
20+
```
21+
Usage:
1822
19-
### Options:
20-
* `--stringfile` [default: Localizable.strings] - The input POEditor strings file directory.
21-
* `--swiftfile` [default: Literals.swift] - The output Swift file directory.
23+
$ poe <APITOKEN> <id> <language>
24+
25+
Arguments:
26+
27+
APITOKEN - The POEditor API token
28+
id - The id of the project
29+
language - The language code
30+
31+
Options:
32+
--swiftfile [default: ${SRCROOT}/${TARGET_NAME}/Literals.swift] - The output Swift file directory.
33+
--stringsfile [default: ${SRCROOT}/${TARGET_NAME}/Localizable.strings] - The output Strings file directory.
34+
```
2235

2336
## Authors & Collaborators
2437

Sources/POEditorParser/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PerfectCURL
55

66
let POEditorAPIURL = "https://api.poeditor.com/v2"
77

8-
let main = command(
8+
command(
99
Argument<String>("APITOKEN", description: "The POEditor API token"),
1010
Argument<Int>("id", description: "The id of the project"),
1111
Argument<String>("language", description: "The language code"),

0 commit comments

Comments
 (0)