From 711cd26192fc573660e220fe071a0e78510f9f04 Mon Sep 17 00:00:00 2001 From: toshi0383 Date: Sun, 30 Dec 2018 08:08:21 +0900 Subject: [PATCH 1/9] Update code base --- Package.pins | 114 ------------------ Package.resolved | 61 ++++++++++ Package.swift | 38 +++--- Sources/Utilities/OperatorAndFunctions.swift | 13 -- Sources/Utilities/PathKit+Commander.swift | 19 ++- Sources/Utilities/Validators.swift | 11 +- Sources/Utilities/Xcodeproj.swift | 12 ++ Sources/xcconfig-extractor/Config.swift | 10 +- .../xcconfig-extractor/ErrorReporter.swift | 8 -- .../xcconfig-extractor/ResultFormatter.swift | 8 -- Sources/xcconfig-extractor/ResultObject.swift | 10 +- Sources/xcconfig-extractor/main.swift | 90 ++++++++------ Tests/main.sh | 3 +- 13 files changed, 152 insertions(+), 245 deletions(-) delete mode 100644 Package.pins create mode 100644 Package.resolved create mode 100644 Sources/Utilities/Xcodeproj.swift diff --git a/Package.pins b/Package.pins deleted file mode 100644 index 64dd252..0000000 --- a/Package.pins +++ /dev/null @@ -1,114 +0,0 @@ -{ - "autoPin": true, - "pins": [ - { - "package": "AsciiPlistParser", - "reason": null, - "repositoryURL": "https://github.com/toshi0383/AsciiPlistParser.git", - "version": "0.3.0-rc3" - }, - { - "package": "Clang_C", - "reason": null, - "repositoryURL": "https://github.com/norio-nomura/Clang_C.git", - "version": "1.0.2" - }, - { - "package": "Commandant", - "reason": null, - "repositoryURL": "https://github.com/Carthage/Commandant.git", - "version": "0.12.0" - }, - { - "package": "Commander", - "reason": null, - "repositoryURL": "https://github.com/kylef/Commander.git", - "version": "0.6.1" - }, - { - "package": "CommonCrypto", - "reason": null, - "repositoryURL": "https://github.com/IBM-Swift/CommonCrypto.git", - "version": "0.1.4" - }, - { - "package": "PathKit", - "reason": null, - "repositoryURL": "https://github.com/kylef/PathKit.git", - "version": "0.8.0" - }, - { - "package": "Pbxproj", - "reason": null, - "repositoryURL": "https://github.com/toshi0383/Pbxproj.git", - "version": "0.2.0" - }, - { - "package": "Result", - "reason": null, - "repositoryURL": "https://github.com/antitypical/Result.git", - "version": "3.2.3" - }, - { - "package": "SWXMLHash", - "reason": null, - "repositoryURL": "https://github.com/drmohundro/SWXMLHash.git", - "version": "3.1.0" - }, - { - "package": "SourceKit", - "reason": null, - "repositoryURL": "https://github.com/norio-nomura/SourceKit.git", - "version": "1.0.1" - }, - { - "package": "SourceKitten", - "reason": null, - "repositoryURL": "https://github.com/jpsim/SourceKitten.git", - "version": "0.17.6" - }, - { - "package": "Sourcery", - "reason": null, - "repositoryURL": "https://github.com/krzysztofzablocki/Sourcery.git", - "version": "0.6.1" - }, - { - "package": "Spectre", - "reason": null, - "repositoryURL": "https://github.com/kylef/Spectre.git", - "version": "0.7.2" - }, - { - "package": "Stencil", - "reason": null, - "repositoryURL": "https://github.com/kylef/Stencil.git", - "version": "0.9.0" - }, - { - "package": "StencilSwiftKit", - "reason": null, - "repositoryURL": "https://github.com/SwiftGen/StencilSwiftKit.git", - "version": "1.0.2" - }, - { - "package": "SwiftTryCatch", - "reason": null, - "repositoryURL": "https://github.com/vknabel/SwiftTryCatch.git", - "version": "1.1.0" - }, - { - "package": "XcodeEdit", - "reason": null, - "repositoryURL": "https://github.com/tomlokhorst/XcodeEdit.git", - "version": "1.1.0" - }, - { - "package": "Yams", - "reason": null, - "repositoryURL": "https://github.com/jpsim/Yams.git", - "version": "0.3.2" - } - ], - "version": 1 -} \ No newline at end of file diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..c3dfbfe --- /dev/null +++ b/Package.resolved @@ -0,0 +1,61 @@ +{ + "object": { + "pins": [ + { + "package": "AEXML", + "repositoryURL": "https://github.com/tadija/AEXML", + "state": { + "branch": null, + "revision": "54bb8ea6fb693dd3f92a89e5fcc19e199fdeedd0", + "version": "4.3.3" + } + }, + { + "package": "Commander", + "repositoryURL": "https://github.com/kylef/Commander", + "state": { + "branch": null, + "revision": "e5b50ad7b2e91eeb828393e89b03577b16be7db9", + "version": "0.8.0" + } + }, + { + "package": "PathKit", + "repositoryURL": "https://github.com/kylef/PathKit", + "state": { + "branch": null, + "revision": "e2f5be30e4c8f531c9c1e8765aa7b71c0a45d7a0", + "version": "0.9.2" + } + }, + { + "package": "Spectre", + "repositoryURL": "https://github.com/kylef/Spectre.git", + "state": { + "branch": null, + "revision": "f14ff47f45642aa5703900980b014c2e9394b6e5", + "version": "0.9.0" + } + }, + { + "package": "SwiftShell", + "repositoryURL": "https://github.com/kareman/SwiftShell", + "state": { + "branch": null, + "revision": "beebe43c986d89ea5359ac3adcb42dac94e5e08a", + "version": "4.1.2" + } + }, + { + "package": "xcodeproj", + "repositoryURL": "https://github.com/tuist/xcodeproj", + "state": { + "branch": null, + "revision": "23da51abd3de3bedaad59a0afbb150b48504b5b0", + "version": "6.3.0" + } + } + ] + }, + "version": 1 +} diff --git a/Package.swift b/Package.swift index a5124d4..627f9ec 100644 --- a/Package.swift +++ b/Package.swift @@ -1,31 +1,21 @@ -// swift-tools-version:3.1 +// swift-tools-version:4.2 +// Managed by ice -import Foundation import PackageDescription -var isDevelopment: Bool { - return ProcessInfo.processInfo.environment["SWIFTPM_DEVELOPMENT"] == "YES" -} - let package = Package( name: "xcconfig-extractor", - targets: [ - Target(name: "xcconfig-extractor", dependencies: ["Utilities"]), - Target(name: "Utilities"), + products: [ + .executable(name: "xcconfig-extractor", targets: ["xcconfig-extractor"]), + ], + dependencies: [ + .package(url: "https://github.com/kylef/PathKit", from: "0.9.2"), + .package(url: "https://github.com/kylef/Commander", from: "0.8.0"), + .package(url: "https://github.com/tuist/xcodeproj", from: "6.3.0"), ], - dependencies: { - var deps: [Package.Dependency] = [ - .Package(url: "https://github.com/kylef/Commander.git", majorVersion: 0), - .Package(url: "https://github.com/kylef/PathKit.git", majorVersion: 0), - .Package(url: "https://github.com/toshi0383/Pbxproj.git", majorVersion: 0), - ] - if isDevelopment { - deps += [ - .Package(url: "https://github.com/krzysztofzablocki/Sourcery.git", majorVersion: 0, minor: 6), - ] - } - return deps - }(), - exclude: ["Resources/SourceryTemplates"] + targets: [ + .target(name: "xcconfig-extractor", dependencies: ["Utilities", "PathKit", "Commander", "xcodeproj"]), + .target(name: "Utilities", dependencies: ["xcodeproj", "PathKit", "Commander"]), + .testTarget(name: "UtilitiesTests", dependencies: ["Utilities"]), + ] ) - diff --git a/Sources/Utilities/OperatorAndFunctions.swift b/Sources/Utilities/OperatorAndFunctions.swift index 07dc6bb..79573ae 100644 --- a/Sources/Utilities/OperatorAndFunctions.swift +++ b/Sources/Utilities/OperatorAndFunctions.swift @@ -1,14 +1,5 @@ -// -// OperatorAndFunctions.swift -// xcconfig-extractor -// -// Created by Toshihiro Suzuki on 2017/04/27. -// Copyright © 2017 Toshihiro Suzuki. All rights reserved. -// - import Foundation import PathKit -import AsciiPlistParser public func compare(_ l: Any, _ r: Any) -> Bool { switch l { @@ -44,10 +35,6 @@ public func compare(_ l: Any, _ r: Any) -> Bool { public func convertToLines(_ dictionary: [String: Any]) -> [String] { let result = dictionary.map { (k, v) -> String in switch v { - case let s as StringValue: - return "\(k) = \(s.value)" - case let s as [StringValue]: - return "\(k) = \(s.map{$0.value}.joined(separator: " "))" case let s as String: return "\(k) = \(s)" case let s as [String]: diff --git a/Sources/Utilities/PathKit+Commander.swift b/Sources/Utilities/PathKit+Commander.swift index 42a5e93..09f6b82 100644 --- a/Sources/Utilities/PathKit+Commander.swift +++ b/Sources/Utilities/PathKit+Commander.swift @@ -1,21 +1,18 @@ -// -// PathKit+Commander.swift -// xcconfig-extractor -// -// Created by Toshihiro Suzuki on 2017/04/27. -// Copyright © 2017 toshi0383. All rights reserved. -// - -import Foundation - import Commander +import Foundation import PathKit -extension Path : ArgumentConvertible { +// MARK: ArgumentConvertible + +extension Path: ArgumentConvertible { + public init(parser: ArgumentParser) throws { + guard let path = parser.shift() else { throw ArgumentError.missingValue(argument: nil) } + self = Path(path) } + } diff --git a/Sources/Utilities/Validators.swift b/Sources/Utilities/Validators.swift index bbb1297..16d8a3d 100644 --- a/Sources/Utilities/Validators.swift +++ b/Sources/Utilities/Validators.swift @@ -1,14 +1,5 @@ -// -// Validators.swift -// xcconfig-extractor -// -// Created by Toshihiro Suzuki on 2017/04/27. -// Copyright © 2017 Toshihiro Suzuki. All rights reserved. -// - -import Foundation - import Commander +import Foundation import PathKit public func checkPath(type: String, assertion: @escaping (Path) -> Bool) -> ((Path) throws -> Path) { diff --git a/Sources/Utilities/Xcodeproj.swift b/Sources/Utilities/Xcodeproj.swift new file mode 100644 index 0000000..c905abc --- /dev/null +++ b/Sources/Utilities/Xcodeproj.swift @@ -0,0 +1,12 @@ +import Foundation +import xcodeproj + +extension PBXProj { + public var targets: [PBXNativeTarget] { + return nativeTargets + } + + public func fileReferences(named nameOrPath: String) -> [PBXFileReference] { + return groups.map { $0.file(named: nameOrPath) }.compactMap { $0 } + } +} diff --git a/Sources/xcconfig-extractor/Config.swift b/Sources/xcconfig-extractor/Config.swift index 8c0d58c..e3cf935 100644 --- a/Sources/xcconfig-extractor/Config.swift +++ b/Sources/xcconfig-extractor/Config.swift @@ -1,15 +1,7 @@ -// -// Config.swift -// xcconfig-extractor -// -// Created by Toshihiro Suzuki on 2017/04/30. -// Copyright © 2017 Toshihiro Suzuki. All rights reserved. -// - import Foundation struct Config { - static let version = "0.4.0" + static let version = "0.5.0" let isIncludeExisting: Bool init(isIncludeExisting: Bool) { self.isIncludeExisting = isIncludeExisting diff --git a/Sources/xcconfig-extractor/ErrorReporter.swift b/Sources/xcconfig-extractor/ErrorReporter.swift index c10c142..ce91d54 100644 --- a/Sources/xcconfig-extractor/ErrorReporter.swift +++ b/Sources/xcconfig-extractor/ErrorReporter.swift @@ -1,11 +1,3 @@ -// -// ErrorReporter.swift -// xcconfig-extractor -// -// Created by Toshihiro Suzuki on 2017/04/30. -// Copyright © 2017 Toshihiro Suzuki. All rights reserved. -// - import Foundation func printStdError(_ message: String) { diff --git a/Sources/xcconfig-extractor/ResultFormatter.swift b/Sources/xcconfig-extractor/ResultFormatter.swift index 8835491..8aca193 100644 --- a/Sources/xcconfig-extractor/ResultFormatter.swift +++ b/Sources/xcconfig-extractor/ResultFormatter.swift @@ -1,11 +1,3 @@ -// -// ResultFormatter.swift -// xcconfig-extractor -// -// Created by Toshihiro Suzuki on 2017/04/30. -// Copyright © 2017 Toshihiro Suzuki. All rights reserved. -// - import Foundation class ResultFormatter { diff --git a/Sources/xcconfig-extractor/ResultObject.swift b/Sources/xcconfig-extractor/ResultObject.swift index f9a412e..b58dccf 100644 --- a/Sources/xcconfig-extractor/ResultObject.swift +++ b/Sources/xcconfig-extractor/ResultObject.swift @@ -1,15 +1,7 @@ -// -// ResultObject.swift -// xcconfig-extractor -// -// Created by Toshihiro Suzuki on 2017/04/30. -// Copyright © 2017 Toshihiro Suzuki. All rights reserved. -// - import Foundation import PathKit -class ResultObject: Equatable { +final class ResultObject: Equatable { let path: Path var settings: [String] let targetName: String? diff --git a/Sources/xcconfig-extractor/main.swift b/Sources/xcconfig-extractor/main.swift index 66d4404..0715574 100644 --- a/Sources/xcconfig-extractor/main.swift +++ b/Sources/xcconfig-extractor/main.swift @@ -1,16 +1,8 @@ -// -// main.swift -// xcconfig-extractor -// -// Created by Toshihiro Suzuki on 2017/04/27. -// Copyright © 2017 Toshihiro Suzuki. All rights reserved. -// - -import Foundation import Commander +import Foundation import PathKit -import Pbxproj import Utilities +import xcodeproj func write(to path: Path, lines: [String] = []) throws { let data = (lines.joined(separator: "\n") as NSString).data(using: String.Encoding.utf8.rawValue)! @@ -20,10 +12,10 @@ func write(to path: Path, lines: [String] = []) throws { let main = command( Argument("PATH", description: "xcodeproj file", validator: dirExists), Argument("DIR", description: "Output directory of xcconfig files. Mkdirs if missing. Files are overwritten."), - Flag("no-trim-duplicates", description: "Don't extract duplicated lines to common xcconfig files, simply map each buildSettings to one file.", default: false), - Flag("no-edit-pbxproj", description: "Do not modify pbxproj at all.", default: false), - Flag("include-existing", description: "`#include` already configured xcconfigs.", default: true), - Flag("no-set-configurations", description: "Do not set xcconfig(baseConfigurationReference) in pbxproj. Ignored if `--no-edit-pbxproj` is true.", default: false) + Flag("no-trim-duplicates", default: false, description: "Don't extract duplicated lines to common xcconfig files, simply map each buildSettings to one file."), + Flag("no-edit-pbxproj", default: false, description: "Do not modify pbxproj at all."), + Flag("include-existing", default: false, description: "`#include` already configured xcconfigs."), + Flag("no-set-configurations", default: false, description: "Do not set xcconfig(baseConfigurationReference) in pbxproj. Ignored if `--no-edit-pbxproj` is true.") ) { xcodeprojPath, dirPath, isNoTrimDuplicates, isNoEdit, isIncludeExisting, isNoSetConfigurations in let pbxprojPath = xcodeprojPath + Path("project.pbxproj") @@ -53,49 +45,65 @@ let main = command( // // read // - guard let pbxproj = try? Pbxproj(path: pbxprojPath.string) else { - printStdError("Failed to parse Pbxproj") + + guard let xcodeproj = try? XcodeProj(path: xcodeprojPath) else { + printStdError("Failed to parse xcodeproj") exit(1) } + let pbxproj = xcodeproj.pbxproj + // // write // var baseResults = [ResultObject]() var targetResults = [ResultObject]() + let configurations = pbxproj.buildConfigurations + // base - for configuration in pbxproj.rootObject.buildConfigurationList.buildConfigurations { + for configuration in configurations { let filePath = Path("\(dirPath.string)/\(configuration.name).xcconfig") - let buildSettings = configuration.buildSettings.dictionary + let buildSettings = configuration.buildSettings let lines = convertToLines(buildSettings) let r = ResultObject(path: filePath, settings: lines, configurationName: configuration.name) if config.isIncludeExisting { - if let fileref = configuration.baseConfigurationReference { + if let fileref = configuration.baseConfiguration { let depth = (dirPath.components - projRoot.components).count - let prefix = (0.. before COMMAND="${XCCONFIG_EXTRACTOR} ${proj} ${tmpdir}" + echo $COMMAND $COMMAND && ls -l ${tmpdir} if [ $? -ne 0 ];then echo Execution Failed: $COMMAND From b1cd15e36e2bcd00ec5bea52e764367907062644 Mon Sep 17 00:00:00 2001 From: toshi0383 Date: Sun, 30 Dec 2018 10:17:13 +0900 Subject: [PATCH 2/9] Fix absolute and relative paths --- Sources/xcconfig-extractor/main.swift | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Sources/xcconfig-extractor/main.swift b/Sources/xcconfig-extractor/main.swift index 0715574..5361d42 100644 --- a/Sources/xcconfig-extractor/main.swift +++ b/Sources/xcconfig-extractor/main.swift @@ -23,9 +23,13 @@ let main = command( printStdError("pbxproj not exist!: \(pbxprojPath.string)") exit(1) } + let projRoot = xcodeprojPath + ".." + + let dirPathComponents = dirPath.absolute().components + // validate DIR - guard dirPath.absolute().components.starts(with: projRoot.absolute().components) else { + guard dirPathComponents.starts(with: projRoot.absolute().components) else { printStdError("Invalid DIR parameter: \(dirPath.string)\nIt must be descendant of xcodeproj's root dir: \(projRoot.string)") exit(1) } @@ -162,7 +166,13 @@ let main = command( } // Remove buildSettings from pbxproj and Setup xcconfigs let mainGroup = try! pbxproj.rootGroup()! - let group = try mainGroup.addGroup(named: dirPath.string, options: [GroupAddingOptions.withoutFolder]).last! + + let dirPathForGroup = dirPath.isAbsolute + ? Path((dirPathComponents - projRoot.absolute().components).joined(separator: "/")) + : dirPath + + let group = try mainGroup.addGroup(named: dirPathForGroup.string, + options: [GroupAddingOptions.withoutFolder]).last! for file in try dirPath.children() { try group.addFile(at: file, sourceRoot: dirPath) } From dee0cfee9de4754be8f406a3180d62827b07b06e Mon Sep 17 00:00:00 2001 From: toshi0383 Date: Sun, 30 Dec 2018 10:39:23 +0900 Subject: [PATCH 3/9] Fix configuration retrieval --- Sources/xcconfig-extractor/main.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/xcconfig-extractor/main.swift b/Sources/xcconfig-extractor/main.swift index 5361d42..1cb3cfa 100644 --- a/Sources/xcconfig-extractor/main.swift +++ b/Sources/xcconfig-extractor/main.swift @@ -63,7 +63,7 @@ let main = command( var baseResults = [ResultObject]() var targetResults = [ResultObject]() - let configurations = pbxproj.buildConfigurations + let configurations = pbxproj.configurationLists.filter { $0.defaultConfigurationName != nil }.map { $0.buildConfigurations }.flatMap { $0 } // base for configuration in configurations { @@ -195,6 +195,7 @@ let main = command( } } for target in pbxproj.targets { + let configurations = target.buildConfigurationList!.buildConfigurations for configuration in configurations { configuration.buildSettings = [:] if isNoSetConfigurations { From c089995412aa70664a35a32fc9ae336da0c71769 Mon Sep 17 00:00:00 2001 From: toshi0383 Date: Sun, 30 Dec 2018 12:40:23 +0900 Subject: [PATCH 4/9] Fix test failures --- Fixtures | 2 +- Sources/xcconfig-extractor/main.swift | 4 ++-- Tests/main.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Fixtures b/Fixtures index f61acaf..71b00ed 160000 --- a/Fixtures +++ b/Fixtures @@ -1 +1 @@ -Subproject commit f61acafa1f409f285385471b24c5b5e1d70b77f9 +Subproject commit 71b00ed8e3d8c7f861300c4837988903bf072e10 diff --git a/Sources/xcconfig-extractor/main.swift b/Sources/xcconfig-extractor/main.swift index 1cb3cfa..e7dc5ac 100644 --- a/Sources/xcconfig-extractor/main.swift +++ b/Sources/xcconfig-extractor/main.swift @@ -63,7 +63,7 @@ let main = command( var baseResults = [ResultObject]() var targetResults = [ResultObject]() - let configurations = pbxproj.configurationLists.filter { $0.defaultConfigurationName != nil }.map { $0.buildConfigurations }.flatMap { $0 } + let configurations = pbxproj.rootObject!.buildConfigurationList.buildConfigurations // base for configuration in configurations { @@ -174,7 +174,7 @@ let main = command( let group = try mainGroup.addGroup(named: dirPathForGroup.string, options: [GroupAddingOptions.withoutFolder]).last! for file in try dirPath.children() { - try group.addFile(at: file, sourceRoot: dirPath) + try group.addFile(at: file, sourceTree: .absolute, sourceRoot: dirPath) } for configuration in configurations { diff --git a/Tests/main.sh b/Tests/main.sh index a2ce482..5236940 100755 --- a/Tests/main.sh +++ b/Tests/main.sh @@ -12,7 +12,7 @@ fi set +e dir=${PWD} -for proj in $(find Fixtures -name "*xcodeproj") +for proj in $(find Fixtures -name "*xcodeproj" | grep -v archive) do echo "==============================" echo $proj From 7ae0a85540d7935df725a71af2d9fa58b5bd33f6 Mon Sep 17 00:00:00 2001 From: toshi0383 Date: Sun, 30 Dec 2018 12:51:25 +0900 Subject: [PATCH 5/9] Update submodule url with https --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 8feba9b..5137d21 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "Fixtures"] path = Fixtures - url = git@github.com:toshi0383/xcodeproj-fixtures.git + url = https://github.com/toshi0383/xcodeproj-fixtures.git From 2b2e8d9222fbad34ac7fc0035a72386280802ed6 Mon Sep 17 00:00:00 2001 From: toshi0383 Date: Sun, 30 Dec 2018 12:59:47 +0900 Subject: [PATCH 6/9] Update README --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ebabe29..a29775f 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # xcconfig-extractor -Refactor buildSettings into xcconfigs with one shot🚀 +Refactor buildSettings into xcconfigs. -[![Build Status](https://www.bitrise.io/app/9823e204182ddb41.svg?token=hychUqBHuvhZfzLLl2Ehiw&branch=master)](https://www.bitrise.io/app/9823e204182ddb41) +[![Build Status](https://app.bitrise.io/app/31197448d2a1080e/status.svg?token=_xOjshR6oPSWAMcHBH3rqg&branch=master)](https://app.bitrise.io/app/31197448d2a1080e) # Requirements -- Xcode8+ is officially supported, but should work against older ones too. +- Xcode10+ is officially supported, but should work against older ones too. # Usage @@ -65,13 +65,15 @@ e.g. ``` # Install -## install.sh +## Binary install I've written install/release scripts for SwiftPM executable. This should be the easiest way. ``` bash <(curl -sL https://raw.githubusercontent.com/toshi0383/scripts/master/swiftpm/install.sh) toshi0383/xcconfig-extractor ``` +Or go to the [release page](https://github.com/toshi0383/xcconfig-extractor/releases) and download `xcconfig-extractor.zip` go download the standalone binary manually. + ## Build from source - Clone this repo and run `swift build -c release`. - Executable will be created at `.build/release/xcconfig-extractor`. From 2ee666ba08a9c20e63a0fd717adf7b6af28ef116 Mon Sep 17 00:00:00 2001 From: toshi0383 Date: Sun, 30 Dec 2018 13:04:27 +0900 Subject: [PATCH 7/9] Update Makefile --- Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 098f9b5..cf9f263 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,17 @@ .PHONY = update build bootstrap sourcery -SOURCERY ?= ./.build/debug/sourcery -PARAM = SWIFTPM_DEVELOPMENT=YES +SOURCERY ?= sourcery test: - $(PARAM) swift test + swift test update: - $(PARAM) swift package update + swift package update build: - $(PARAM) swift build + swift build bootstrap: build - $(PARAM) swift package generate-xcodeproj + swift package generate-xcodeproj # todo: Add fixtures to xcodeproj sourcery: $(SOURCERY) --templates Resources/SourceryTemplates/LinuxMain.stencil --sources Tests/ --output From 5d8a08f67ec3e7591004785c81dac2308457455c Mon Sep 17 00:00:00 2001 From: toshi0383 Date: Sun, 30 Dec 2018 13:10:03 +0900 Subject: [PATCH 8/9] patreon label --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index a29775f..7e95b29 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ Refactor buildSettings into xcconfigs. [![Build Status](https://app.bitrise.io/app/31197448d2a1080e/status.svg?token=_xOjshR6oPSWAMcHBH3rqg&branch=master)](https://app.bitrise.io/app/31197448d2a1080e) +[![patreon](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://www.patreon.com/bePatron?u=13627375) # Requirements - Xcode10+ is officially supported, but should work against older ones too. @@ -78,5 +79,10 @@ Or go to the [release page](https://github.com/toshi0383/xcconfig-extractor/rele - Clone this repo and run `swift build -c release`. - Executable will be created at `.build/release/xcconfig-extractor`. +# Donate +If you think it's a useful tool, consider donation to maintain project. + +[![patreon](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://www.patreon.com/bePatron?u=13627375) + # License MIT From 9770e08c57fe675229399c8dacff04817fb799ff Mon Sep 17 00:00:00 2001 From: toshi0383 Date: Sun, 30 Dec 2018 13:11:13 +0900 Subject: [PATCH 9/9] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 240f1c9..229ed59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.5.0 +* Update codebase + [Toshihiro Suzuki](https://github.com/toshi0383) + [#20](https://github.com/toshi0383/xcconfig-extractor/pull/20) + ## 0.4.0 * Modify pbxproj using toshi0383/Pbxproj [Toshihiro Suzuki](https://github.com/toshi0383)