Compare commits

...

5 Commits

Author SHA1 Message Date
Eric Rabil
311a0ed5b7
Merge c442558e73 into 8beb3b2d2d 2024-08-14 12:43:22 +02:00
Mizuo Nagayama
8beb3b2d2d
fix plural in ProjectSpec.md (#1487) 2024-08-06 05:35:27 +09:00
Eric Rabil
c442558e73
Merge pull request #1 from yonaskolb/master
Update fork
2022-03-14 15:13:41 -04:00
Eric Rabil
52f8206325 Place productName override behind productNameFromSettings 2022-01-06 12:10:12 -05:00
Eric Rabil
d1382f18e8 Use produce name from settings as the reference name if present 2022-01-06 12:05:23 -05:00
2 changed files with 9 additions and 4 deletions

View File

@ -1039,7 +1039,7 @@ The different actions share some properties:
- [ ] **askForAppToLaunch**: **Bool** - `run` and `profile` actions can define the executable set to ask to launch. This defaults to false.
- [ ] **launchAutomaticallySubstyle**: **String** - `run` action can define the launch automatically substyle ('2' for extensions).
- [ ] **storeKitConfiguration**: **String** - `run` action can specify a storekit configuration. See [Options](#options).
- [ ] **macroExpansion**: **String** - `run` and `test` action can define the macro expansion from other target. This defaults to nil.
- [ ] **macroExpansion**: **String** - `run` and `test` actions can define the macro expansion from other target. This defaults to nil.
### Execution Action

View File

@ -185,18 +185,23 @@ extension Target {
let newTargetName = platformPrefix + targetName + platformSuffix
var settings = platformTarget["settings"] as? JSONDictionary ?? [:]
var newProductName: String?
if settings["configs"] != nil || settings["groups"] != nil || settings["base"] != nil {
var base = settings["base"] as? JSONDictionary ?? [:]
if base["PRODUCT_NAME"] == nil {
if let baseProductName = base["PRODUCT_NAME"] as? String {
newProductName = baseProductName
} else {
base["PRODUCT_NAME"] = targetName
}
settings["base"] = base
} else {
if settings["PRODUCT_NAME"] == nil {
if let productName = settings["PRODUCT_NAME"] as? String {
newProductName = productName
} else {
settings["PRODUCT_NAME"] = targetName
}
}
platformTarget["productName"] = targetName
platformTarget["productName"] = ((platformTarget["productNameFromSettings"] as? Bool == true) ? newProductName : nil) ?? targetName
platformTarget["settings"] = settings
if let deploymentTargets = target["deploymentTarget"] as? [String: Any] {
platformTarget["deploymentTarget"] = deploymentTargets[platform]