Skip to content

Commit

Permalink
Merge pull request #669 from tidev/ios-platform-conf
Browse files Browse the repository at this point in the history
fix: Rename platform config `iphone` to `ios`
  • Loading branch information
joshualambert authored Jul 31, 2024
2 parents a31ecfc + 551d8a7 commit 04956b7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
7.1.1
-------------------
* fix: Rename platform config `iphone` to `ios` to align with
`ti.targetPlatforms`

7.1.0 (5/25/2024)
-------------------
* feat: Support async hook `init()` functions
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "titanium",
"version": "7.1.0",
"version": "7.1.1",
"author": "TiDev, Inc. <[email protected]>",
"description": "Command line interface for building Titanium SDK apps",
"type": "module",
Expand Down
8 changes: 8 additions & 0 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,7 @@ export class CLI {
const platformConf = this.command.conf.platforms[this.argv.platform];

this.argv.$platform = this.argv.platform;
this.command.setOptionValue('platform', this.argv.platform);

// set platform context
this.command.platform = {
Expand Down Expand Up @@ -947,6 +948,13 @@ export class CLI {

// if we have a `--platforms` option branch, override the help
if (conf.platforms) {
// the build command's config `platforms` uses `iphone`, but
// the `ti.targetPlatforms` uses `ios`, so rename the key
if (!conf.platforms.ios && conf.platforms.iphone) {
conf.platforms.ios = conf.platforms.iphone;
delete conf.platforms.iphone;
}

this.debugLogger.trace(`Detected conf.platforms loading "${cmdName}", overriding createHelp()`);
this.command.createHelp = () => {
return Object.assign(new TiHelp(this, conf.platforms), this.command.configureHelp());
Expand Down

0 comments on commit 04956b7

Please sign in to comment.