Skip to content

Commit 04956b7

Browse files
Merge pull request #669 from tidev/ios-platform-conf
fix: Rename platform config `iphone` to `ios`
2 parents a31ecfc + 551d8a7 commit 04956b7

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
7.1.1
2+
-------------------
3+
* fix: Rename platform config `iphone` to `ios` to align with
4+
`ti.targetPlatforms`
5+
16
7.1.0 (5/25/2024)
27
-------------------
38
* feat: Support async hook `init()` functions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "titanium",
3-
"version": "7.1.0",
3+
"version": "7.1.1",
44
"author": "TiDev, Inc. <npm@tidev.io>",
55
"description": "Command line interface for building Titanium SDK apps",
66
"type": "module",

src/cli.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,7 @@ export class CLI {
681681
const platformConf = this.command.conf.platforms[this.argv.platform];
682682

683683
this.argv.$platform = this.argv.platform;
684+
this.command.setOptionValue('platform', this.argv.platform);
684685

685686
// set platform context
686687
this.command.platform = {
@@ -947,6 +948,13 @@ export class CLI {
947948

948949
// if we have a `--platforms` option branch, override the help
949950
if (conf.platforms) {
951+
// the build command's config `platforms` uses `iphone`, but
952+
// the `ti.targetPlatforms` uses `ios`, so rename the key
953+
if (!conf.platforms.ios && conf.platforms.iphone) {
954+
conf.platforms.ios = conf.platforms.iphone;
955+
delete conf.platforms.iphone;
956+
}
957+
950958
this.debugLogger.trace(`Detected conf.platforms loading "${cmdName}", overriding createHelp()`);
951959
this.command.createHelp = () => {
952960
return Object.assign(new TiHelp(this, conf.platforms), this.command.configureHelp());

0 commit comments

Comments
 (0)