From 651fbb86b7b9a8e5006e308a3e4f961006d1995b Mon Sep 17 00:00:00 2001 From: Masayuki Ono Date: Tue, 3 Dec 2019 15:34:39 +0900 Subject: [PATCH] Rename to singlePage from exportAllToRoot --- README.md | 4 ++-- Sources/LicensePlist/main.swift | 4 ++-- Sources/LicensePlistCore/Entity/Config.swift | 2 +- Sources/LicensePlistCore/Entity/PlistInfo.swift | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ce25b277..95129a1d 100644 --- a/README.md +++ b/README.md @@ -162,10 +162,10 @@ You can see options by `license-plist --help`. - Default: false - Only when the files are created or updated, the terminal or the finder opens. By adding `--suppress-opening-directory` flag, this behavior is suppressed. -#### `--export-all-to-root` +#### `--single-page` - Default: false -- All licenses are displayed in one page, not a list. +- All licenses are listed on a single page, not separated pages. ### Integrate into build diff --git a/Sources/LicensePlist/main.swift b/Sources/LicensePlist/main.swift index aeb3dc34..47c962b5 100644 --- a/Sources/LicensePlist/main.swift +++ b/Sources/LicensePlist/main.swift @@ -23,14 +23,14 @@ let main = command(Option("cartfile-path", default: Consts.cartfileName), Flag("force"), Flag("add-version-numbers"), Flag("suppress-opening-directory"), - Flag("export-all-to-root")) { cartfile, podsPath, packagePath, xcodeprojPath, output, gitHubToken, configPath, prefix, htmlPath, markdownPath, force, version, suppressOpen, exportAllToRoot in + Flag("single-page")) { cartfile, podsPath, packagePath, xcodeprojPath, output, gitHubToken, configPath, prefix, htmlPath, markdownPath, force, version, suppressOpen, singlePage in Logger.configure() var config = loadConfig(configPath: URL(fileURLWithPath: configPath)) config.force = force config.addVersionNumbers = version config.suppressOpeningDirectory = suppressOpen - config.exportAllToRoot = exportAllToRoot + config.singlePage = singlePage let options = Options(outputPath: URL(fileURLWithPath: output), cartfilePath: URL(fileURLWithPath: cartfile), podsPath: URL(fileURLWithPath: podsPath), diff --git a/Sources/LicensePlistCore/Entity/Config.swift b/Sources/LicensePlistCore/Entity/Config.swift index e5b5f6ec..c1c59355 100644 --- a/Sources/LicensePlistCore/Entity/Config.swift +++ b/Sources/LicensePlistCore/Entity/Config.swift @@ -10,7 +10,7 @@ public struct Config { public var force = false public var addVersionNumbers = false public var suppressOpeningDirectory = false - public var exportAllToRoot = false + public var singlePage = false public static let empty = Config(githubs: [], manuals: [], excludes: [], renames: [:]) diff --git a/Sources/LicensePlistCore/Entity/PlistInfo.swift b/Sources/LicensePlistCore/Entity/PlistInfo.swift index b9a03557..8a53735f 100644 --- a/Sources/LicensePlistCore/Entity/PlistInfo.swift +++ b/Sources/LicensePlistCore/Entity/PlistInfo.swift @@ -102,7 +102,7 @@ struct PlistInfo { itemsPath.lp.createDirectory() Log.info("Directory created: \(outputPath)") - let holder = options.config.exportAllToRoot ? + let holder = options.config.singlePage ? LicensePlistHolder.loadAllToRoot(licenses: licenses) : LicensePlistHolder.load(licenses: licenses, options: options) holder.write(to: outputPath.appendingPathComponent("\(options.prefix).plist"), itemsPath: itemsPath)