mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-11 12:56:03 +03:00
Fix a typo (#993)
Rename baseOnDependencyAnalysis to basedOnDependencyAnalysis.
This commit is contained in:
parent
9fa02584ab
commit
04d6749441
@ -6,7 +6,7 @@
|
||||
- Support for building and running on Linux platforms. Tested for compatibility with Swift 5.3+ and Ubuntu 18.04. [#988](https://github.com/yonaskolb/XcodeGen/pull/988) @elliottwilliams
|
||||
- Add `useBaseInternationalization` to Project Spec Options to opt out of Base Internationalization. [#961](https://github.com/yonaskolb/XcodeGen/pull/961) @liamnichols
|
||||
- More detailed error message with method arguments. [#990](https://github.com/yonaskolb/XcodeGen/pull/990) @bannzai
|
||||
- Added `baseOnDependencyAnalysis` to Project Spec Build Script to be able to choose not to skip the script. [#992](https://github.com/yonaskolb/XcodeGen/pull/992) @myihsan
|
||||
- Added `basedOnDependencyAnalysis` to Project Spec Build Script to be able to choose not to skip the script. [#992](https://github.com/yonaskolb/XcodeGen/pull/992) @myihsan
|
||||
|
||||
#### Fixed
|
||||
- Fixed error message output for `minimumXcodeGenVersion`. [#967](https://github.com/yonaskolb/XcodeGen/pull/967) @joshwalker
|
||||
|
@ -563,7 +563,7 @@ Each script can contain:
|
||||
- [ ] **shell**: **String** - shell used for the script. Defaults to `/bin/sh`
|
||||
- [ ] **showEnvVars**: **Bool** - whether the environment variables accessible to the script show be printed to the build log. Defaults to yes
|
||||
- [ ] **runOnlyWhenInstalling**: **Bool** - whether the script is only run when installing (`runOnlyForDeploymentPostprocessing`). Defaults to no
|
||||
- [ ] **baseOnDependencyAnalysis**: **Bool** - whether to skip the script if inputs, context, or outputs haven't changed. Defaults to yes
|
||||
- [ ] **basedOnDependencyAnalysis**: **Bool** - whether to skip the script if inputs, context, or outputs haven't changed. Defaults to yes
|
||||
|
||||
Either a **path** or **script** must be defined, the rest are optional.
|
||||
|
||||
|
@ -4,7 +4,7 @@ import JSONUtilities
|
||||
public struct BuildScript: Equatable {
|
||||
public static let runOnlyWhenInstallingDefault = false
|
||||
public static let showEnvVarsDefault = true
|
||||
public static let baseOnDependencyAnalysisDefault = true
|
||||
public static let basedOnDependencyAnalysisDefault = true
|
||||
|
||||
public var script: ScriptType
|
||||
public var name: String?
|
||||
@ -15,7 +15,7 @@ public struct BuildScript: Equatable {
|
||||
public var outputFileLists: [String]
|
||||
public var runOnlyWhenInstalling: Bool
|
||||
public let showEnvVars: Bool
|
||||
public let baseOnDependencyAnalysis: Bool
|
||||
public let basedOnDependencyAnalysis: Bool
|
||||
|
||||
public enum ScriptType: Equatable {
|
||||
case path(String)
|
||||
@ -32,7 +32,7 @@ public struct BuildScript: Equatable {
|
||||
shell: String? = nil,
|
||||
runOnlyWhenInstalling: Bool = runOnlyWhenInstallingDefault,
|
||||
showEnvVars: Bool = showEnvVarsDefault,
|
||||
baseOnDependencyAnalysis: Bool = baseOnDependencyAnalysisDefault
|
||||
basedOnDependencyAnalysis: Bool = basedOnDependencyAnalysisDefault
|
||||
) {
|
||||
self.script = script
|
||||
self.name = name
|
||||
@ -43,7 +43,7 @@ public struct BuildScript: Equatable {
|
||||
self.shell = shell
|
||||
self.runOnlyWhenInstalling = runOnlyWhenInstalling
|
||||
self.showEnvVars = showEnvVars
|
||||
self.baseOnDependencyAnalysis = baseOnDependencyAnalysis
|
||||
self.basedOnDependencyAnalysis = basedOnDependencyAnalysis
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ extension BuildScript: JSONObjectConvertible {
|
||||
shell = jsonDictionary.json(atKeyPath: "shell")
|
||||
runOnlyWhenInstalling = jsonDictionary.json(atKeyPath: "runOnlyWhenInstalling") ?? BuildScript.runOnlyWhenInstallingDefault
|
||||
showEnvVars = jsonDictionary.json(atKeyPath: "showEnvVars") ?? BuildScript.showEnvVarsDefault
|
||||
baseOnDependencyAnalysis = jsonDictionary.json(atKeyPath: "baseOnDependencyAnalysis") ?? BuildScript.baseOnDependencyAnalysisDefault
|
||||
basedOnDependencyAnalysis = jsonDictionary.json(atKeyPath: "basedOnDependencyAnalysis") ?? BuildScript.basedOnDependencyAnalysisDefault
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,8 +85,8 @@ extension BuildScript: JSONEncodable {
|
||||
dict["showEnvVars"] = showEnvVars
|
||||
}
|
||||
|
||||
if baseOnDependencyAnalysis != BuildScript.baseOnDependencyAnalysisDefault {
|
||||
dict["baseOnDependencyAnalysis"] = baseOnDependencyAnalysis
|
||||
if basedOnDependencyAnalysis != BuildScript.basedOnDependencyAnalysisDefault {
|
||||
dict["basedOnDependencyAnalysis"] = basedOnDependencyAnalysis
|
||||
}
|
||||
|
||||
switch script {
|
||||
|
@ -479,7 +479,7 @@ public class PBXProjGenerator {
|
||||
shellScript: shellScript,
|
||||
runOnlyForDeploymentPostprocessing: buildScript.runOnlyWhenInstalling,
|
||||
showEnvVarsInLog: buildScript.showEnvVars,
|
||||
alwaysOutOfDate: !buildScript.baseOnDependencyAnalysis
|
||||
alwaysOutOfDate: !buildScript.basedOnDependencyAnalysis
|
||||
)
|
||||
return addObject(shellScriptPhase)
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ targets:
|
||||
- path: scripts/strip-frameworks.sh
|
||||
name: Strip Unused Architectures from Frameworks
|
||||
runOnlyWhenInstalling: true
|
||||
baseOnDependencyAnalysis: false
|
||||
basedOnDependencyAnalysis: false
|
||||
- name: MyScript
|
||||
script: |
|
||||
echo "You ran a script!"
|
||||
|
@ -389,7 +389,7 @@ class ProjectSpecTests: XCTestCase {
|
||||
shell: "/bin/bash",
|
||||
runOnlyWhenInstalling: true,
|
||||
showEnvVars: true,
|
||||
baseOnDependencyAnalysis: false)],
|
||||
basedOnDependencyAnalysis: false)],
|
||||
postCompileScripts: [BuildScript(script: .path("cmd.sh"),
|
||||
name: "Bar script",
|
||||
inputFiles: ["foo"],
|
||||
@ -399,7 +399,7 @@ class ProjectSpecTests: XCTestCase {
|
||||
shell: "/bin/bash",
|
||||
runOnlyWhenInstalling: true,
|
||||
showEnvVars: true,
|
||||
baseOnDependencyAnalysis: false)],
|
||||
basedOnDependencyAnalysis: false)],
|
||||
postBuildScripts: [BuildScript(script: .path("cmd.sh"),
|
||||
name: "an another script",
|
||||
inputFiles: ["foo"],
|
||||
@ -409,7 +409,7 @@ class ProjectSpecTests: XCTestCase {
|
||||
shell: "/bin/bash",
|
||||
runOnlyWhenInstalling: true,
|
||||
showEnvVars: true,
|
||||
baseOnDependencyAnalysis: false)],
|
||||
basedOnDependencyAnalysis: false)],
|
||||
buildRules: [BuildRule(fileType: .pattern("*.xcassets"),
|
||||
action: .script("pre_process_swift.py"),
|
||||
name: "My Build Rule",
|
||||
@ -459,7 +459,7 @@ class ProjectSpecTests: XCTestCase {
|
||||
shell: "/bin/bash",
|
||||
runOnlyWhenInstalling: true,
|
||||
showEnvVars: false,
|
||||
baseOnDependencyAnalysis: false)],
|
||||
basedOnDependencyAnalysis: false)],
|
||||
scheme: TargetScheme(testTargets: [Scheme.Test.TestTarget(targetReference: "test target",
|
||||
randomExecutionOrder: false,
|
||||
parallelizable: false)],
|
||||
|
@ -1052,10 +1052,10 @@ class SpecLoadingTests: XCTestCase {
|
||||
["path": "script.sh"],
|
||||
["script": "shell script\ndo thing", "name": "myscript", "inputFiles": ["file", "file2"], "outputFiles": ["file", "file2"], "shell": "bin/customshell", "runOnlyWhenInstalling": true],
|
||||
["script": "shell script\ndo thing", "name": "myscript", "inputFiles": ["file", "file2"], "outputFiles": ["file", "file2"], "shell": "bin/customshell", "showEnvVars": false],
|
||||
["script": "shell script\ndo thing", "name": "myscript", "inputFiles": ["file", "file2"], "outputFiles": ["file", "file2"], "shell": "bin/customshell", "baseOnDependencyAnalysis": false],
|
||||
["script": "shell script\ndo thing", "name": "myscript", "inputFiles": ["file", "file2"], "outputFiles": ["file", "file2"], "shell": "bin/customshell", "basedOnDependencyAnalysis": false],
|
||||
["script": "shell script\nwith file lists", "name": "myscript", "inputFileLists": ["inputList.xcfilelist"], "outputFileLists": ["outputList.xcfilelist"], "shell": "bin/customshell", "runOnlyWhenInstalling": true],
|
||||
["script": "shell script\nwith file lists", "name": "myscript", "inputFileLists": ["inputList.xcfilelist"], "outputFileLists": ["outputList.xcfilelist"], "shell": "bin/customshell", "showEnvVars": false],
|
||||
["script": "shell script\nwith file lists", "name": "myscript", "inputFileLists": ["inputList.xcfilelist"], "outputFileLists": ["outputList.xcfilelist"], "shell": "bin/customshell", "baseOnDependencyAnalysis": false],
|
||||
["script": "shell script\nwith file lists", "name": "myscript", "inputFileLists": ["inputList.xcfilelist"], "outputFileLists": ["outputList.xcfilelist"], "shell": "bin/customshell", "basedOnDependencyAnalysis": false],
|
||||
]
|
||||
target["preBuildScripts"] = scripts
|
||||
target["postCompileScripts"] = scripts
|
||||
@ -1063,12 +1063,12 @@ class SpecLoadingTests: XCTestCase {
|
||||
|
||||
let expectedScripts = [
|
||||
BuildScript(script: .path("script.sh")),
|
||||
BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: true, showEnvVars: true, baseOnDependencyAnalysis: true),
|
||||
BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: false, baseOnDependencyAnalysis: true),
|
||||
BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: true, baseOnDependencyAnalysis: false),
|
||||
BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: true, showEnvVars: true, baseOnDependencyAnalysis: true),
|
||||
BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: false, baseOnDependencyAnalysis: true),
|
||||
BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: true, baseOnDependencyAnalysis: false),
|
||||
BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: true, showEnvVars: true, basedOnDependencyAnalysis: true),
|
||||
BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: false, basedOnDependencyAnalysis: true),
|
||||
BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: true, basedOnDependencyAnalysis: false),
|
||||
BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: true, showEnvVars: true, basedOnDependencyAnalysis: true),
|
||||
BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: false, basedOnDependencyAnalysis: true),
|
||||
BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: true, basedOnDependencyAnalysis: false),
|
||||
]
|
||||
|
||||
let parsedTarget = try Target(name: "test", jsonDictionary: target)
|
||||
|
Loading…
Reference in New Issue
Block a user