Skip to content

Commit

Permalink
Merge pull request #672 from tidev/fix-platform-again
Browse files Browse the repository at this point in the history
  • Loading branch information
cb1kenobi authored Aug 1, 2024
2 parents 3f203ea + a0aaaf7 commit ad5354a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@

7.1.2 (7/31/2024)
-------------------
* fix: Force `--platform` to `ios`; the SDK converts `ios` to `iphone`, but
the CLI needs to reverse this to be able to look up the platform config

7.1.1 (7/30/2024)
-------------------
* fix: Rename platform config `iphone` to `ios` to align with
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.1",
"version": "7.1.2",
"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 @@ -639,6 +639,13 @@ export class CLI {
return;
}

// when specifying `--platform ios`, the SDK's option callback converts
// it to `iphone`, however the platform config uses `ios` and we must
// convert it back
if (this.argv.platform === 'iphone') {
this.argv.platform = 'ios';
}

this.debugLogger.trace(`Processing --platform option: ${this.argv.platform || 'not specified'}`);
try {
if (!this.argv.platform) {
Expand Down Expand Up @@ -681,6 +688,7 @@ export class CLI {
const platformConf = this.command.conf.platforms[this.argv.platform];

this.argv.$platform = this.argv.platform;
// set the platform in Commander so we don't lose it when we re-parse the args
this.command.setOptionValue('platform', this.argv.platform);

// set platform context
Expand Down

0 comments on commit ad5354a

Please sign in to comment.