Skip to content

Commit bc76c63

Browse files
authored
Merge pull request #20 from toshi0383/xcode10
Update codebase
2 parents b6c3868 + 9770e08 commit bc76c63

18 files changed

+189
-259
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "Fixtures"]
22
path = Fixtures
3-
url = git@github.com:toshi0383/xcodeproj-fixtures.git
3+
url = https://github.com/toshi0383/xcodeproj-fixtures.git

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.5.0
2+
* Update codebase
3+
[Toshihiro Suzuki](https://github.com/toshi0383)
4+
[#20](https://github.com/toshi0383/xcconfig-extractor/pull/20)
5+
16
## 0.4.0
27
* Modify pbxproj using toshi0383/Pbxproj
38
[Toshihiro Suzuki](https://github.com/toshi0383)

Fixtures

Submodule Fixtures updated 195 files

Makefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
.PHONY = update build bootstrap sourcery
2-
SOURCERY ?= ./.build/debug/sourcery
3-
PARAM = SWIFTPM_DEVELOPMENT=YES
2+
SOURCERY ?= sourcery
43

54
test:
6-
$(PARAM) swift test
5+
swift test
76

87
update:
9-
$(PARAM) swift package update
8+
swift package update
109

1110
build:
12-
$(PARAM) swift build
11+
swift build
1312

1413
bootstrap: build
15-
$(PARAM) swift package generate-xcodeproj
14+
swift package generate-xcodeproj
1615
# todo: Add fixtures to xcodeproj
1716
sourcery:
1817
$(SOURCERY) --templates Resources/SourceryTemplates/LinuxMain.stencil --sources Tests/ --output

Package.pins

Lines changed: 0 additions & 114 deletions
This file was deleted.

Package.resolved

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

Package.swift

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,21 @@
1-
// swift-tools-version:3.1
1+
// swift-tools-version:4.2
2+
// Managed by ice
23

3-
import Foundation
44
import PackageDescription
55

6-
var isDevelopment: Bool {
7-
return ProcessInfo.processInfo.environment["SWIFTPM_DEVELOPMENT"] == "YES"
8-
}
9-
106
let package = Package(
117
name: "xcconfig-extractor",
12-
targets: [
13-
Target(name: "xcconfig-extractor", dependencies: ["Utilities"]),
14-
Target(name: "Utilities"),
8+
products: [
9+
.executable(name: "xcconfig-extractor", targets: ["xcconfig-extractor"]),
10+
],
11+
dependencies: [
12+
.package(url: "https://github.com/kylef/PathKit", from: "0.9.2"),
13+
.package(url: "https://github.com/kylef/Commander", from: "0.8.0"),
14+
.package(url: "https://github.com/tuist/xcodeproj", from: "6.3.0"),
1515
],
16-
dependencies: {
17-
var deps: [Package.Dependency] = [
18-
.Package(url: "https://github.com/kylef/Commander.git", majorVersion: 0),
19-
.Package(url: "https://github.com/kylef/PathKit.git", majorVersion: 0),
20-
.Package(url: "https://github.com/toshi0383/Pbxproj.git", majorVersion: 0),
21-
]
22-
if isDevelopment {
23-
deps += [
24-
.Package(url: "https://github.com/krzysztofzablocki/Sourcery.git", majorVersion: 0, minor: 6),
25-
]
26-
}
27-
return deps
28-
}(),
29-
exclude: ["Resources/SourceryTemplates"]
16+
targets: [
17+
.target(name: "xcconfig-extractor", dependencies: ["Utilities", "PathKit", "Commander", "xcodeproj"]),
18+
.target(name: "Utilities", dependencies: ["xcodeproj", "PathKit", "Commander"]),
19+
.testTarget(name: "UtilitiesTests", dependencies: ["Utilities"]),
20+
]
3021
)
31-

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# xcconfig-extractor
2-
Refactor buildSettings into xcconfigs with one shot🚀
2+
Refactor buildSettings into xcconfigs.
33

4-
[![Build Status](https://www.bitrise.io/app/9823e204182ddb41.svg?token=hychUqBHuvhZfzLLl2Ehiw&branch=master)](https://www.bitrise.io/app/9823e204182ddb41)
4+
[![Build Status](https://app.bitrise.io/app/31197448d2a1080e/status.svg?token=_xOjshR6oPSWAMcHBH3rqg&branch=master)](https://app.bitrise.io/app/31197448d2a1080e)
5+
[![patreon](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://www.patreon.com/bePatron?u=13627375)
56

67
# Requirements
7-
- Xcode8+ is officially supported, but should work against older ones too.
8+
- Xcode10+ is officially supported, but should work against older ones too.
89

910
# Usage
1011

@@ -65,16 +66,23 @@ e.g.
6566
```
6667
6768
# Install
68-
## install.sh
69+
## Binary install
6970
I've written install/release scripts for SwiftPM executable.
7071
This should be the easiest way.
7172
```
7273
bash <(curl -sL https://raw.githubusercontent.com/toshi0383/scripts/master/swiftpm/install.sh) toshi0383/xcconfig-extractor
7374
```
7475

76+
Or go to the [release page](https://github.com/toshi0383/xcconfig-extractor/releases) and download `xcconfig-extractor.zip` go download the standalone binary manually.
77+
7578
## Build from source
7679
- Clone this repo and run `swift build -c release`.
7780
- Executable will be created at `.build/release/xcconfig-extractor`.
7881

82+
# Donate
83+
If you think it's a useful tool, consider donation to maintain project.
84+
85+
[![patreon](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://www.patreon.com/bePatron?u=13627375)
86+
7987
# License
8088
MIT

Sources/Utilities/OperatorAndFunctions.swift

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
//
2-
// OperatorAndFunctions.swift
3-
// xcconfig-extractor
4-
//
5-
// Created by Toshihiro Suzuki on 2017/04/27.
6-
// Copyright © 2017 Toshihiro Suzuki. All rights reserved.
7-
//
8-
91
import Foundation
102
import PathKit
11-
import AsciiPlistParser
123

134
public func compare(_ l: Any, _ r: Any) -> Bool {
145
switch l {
@@ -44,10 +35,6 @@ public func compare(_ l: Any, _ r: Any) -> Bool {
4435
public func convertToLines(_ dictionary: [String: Any]) -> [String] {
4536
let result = dictionary.map { (k, v) -> String in
4637
switch v {
47-
case let s as StringValue:
48-
return "\(k) = \(s.value)"
49-
case let s as [StringValue]:
50-
return "\(k) = \(s.map{$0.value}.joined(separator: " "))"
5138
case let s as String:
5239
return "\(k) = \(s)"
5340
case let s as [String]:
Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1-
//
2-
// PathKit+Commander.swift
3-
// xcconfig-extractor
4-
//
5-
// Created by Toshihiro Suzuki on 2017/04/27.
6-
// Copyright © 2017 toshi0383. All rights reserved.
7-
//
8-
9-
import Foundation
10-
111
import Commander
2+
import Foundation
123
import PathKit
134

14-
extension Path : ArgumentConvertible {
5+
// MARK: ArgumentConvertible
6+
7+
extension Path: ArgumentConvertible {
8+
159
public init(parser: ArgumentParser) throws {
10+
1611
guard let path = parser.shift() else {
1712
throw ArgumentError.missingValue(argument: nil)
1813
}
14+
1915
self = Path(path)
2016
}
17+
2118
}

0 commit comments

Comments
 (0)