Skip to content

Commit fa36b95

Browse files
authored
Merge pull request #862 from tidev/sdk-main-branch
2 parents 42569b4 + 3aee9f3 commit fa36b95

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
8.1.2 (10/28/2025)
2+
-------------------
3+
* fix: Add support for SDK `main` branch builds
4+
15
8.1.1 (10/21/2025)
26
-------------------
37
* fix: Emit `post-execute` hook for commands with async `run()`

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": "8.1.1",
3+
"version": "8.1.2",
44
"author": "TiDev, Inc. <[email protected]>",
55
"description": "Command line interface for building Titanium SDK apps",
66
"type": "module",

src/commands/sdk.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ SdkSubcommands.list = {
172172
[cli.argv.branch]: branchBuilds
173173
} : {},
174174
branches: {
175-
defaultBranch: 'master',
175+
defaultBranch: 'main',
176176
branches: branches || []
177177
},
178178
defaultInstallLocation,
@@ -257,7 +257,7 @@ ${r.type !== 'ga' ? gray(' [unstable]') : i++ === 0 ? green(' [latest stable]'
257257
logger.log(` ${branches.message.red}`);
258258
} else {
259259
for (const b of branches) {
260-
logger.log(` ${cyan(b)}${b === 'master' ? gray(' [default]') : ''}`);
260+
logger.log(` ${cyan(b)}${b === 'main' ? gray(' [default]') : ''}`);
261261
}
262262
}
263263
}

test/commands/ti-sdk.test.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ describe('ti sdk', () => {
8989
assert.deepStrictEqual(json, {
9090
branch: {},
9191
branches: {
92-
defaultBranch: 'master',
92+
defaultBranch: 'main',
9393
branches: []
9494
},
9595
defaultInstallLocation: tmpSDKDir,
@@ -129,7 +129,7 @@ describe('ti sdk', () => {
129129
assert.deepStrictEqual(json, {
130130
branch: {},
131131
branches: {
132-
defaultBranch: 'master',
132+
defaultBranch: 'main',
133133
branches: []
134134
},
135135
defaultInstallLocation: tmpSDKDir,
@@ -171,7 +171,7 @@ describe('ti sdk', () => {
171171
assert.deepStrictEqual(json, {
172172
branch: {},
173173
branches: {
174-
defaultBranch: 'master',
174+
defaultBranch: 'main',
175175
branches: []
176176
},
177177
defaultInstallLocation: tmpSDKDir,
@@ -196,7 +196,7 @@ describe('ti sdk', () => {
196196
assert.deepStrictEqual(json, {
197197
branch: {},
198198
branches: {
199-
defaultBranch: 'master',
199+
defaultBranch: 'main',
200200
branches: []
201201
},
202202
defaultInstallLocation: tmpSDKDir,
@@ -270,7 +270,7 @@ describe('ti sdk', () => {
270270
let output = stripColor(stdout);
271271
assert.match(output, /Titanium Command-Line Interface/);
272272
assert.match(output, new RegExp(`SDK Install Locations:\n\\s*${tmpSDKDir.replace(/\\/g, '\\\\')}`));
273-
assert.match(output, /Branches:\n\s*master/);
273+
assert.match(output, /Branches:\n\s*(main|master)/);
274274

275275
// list stable releases
276276
({ exitCode, stdout } = await run(['sdk', 'list', '-r']));
@@ -290,17 +290,17 @@ describe('ti sdk', () => {
290290
assert.match(output, /12\.2\.0\.RC\s+8\/11\/23/);
291291

292292
// list branch builds
293-
({ exitCode, stdout } = await run(['sdk', 'list', '--branch', 'master']));
293+
({ exitCode, stdout } = await run(['sdk', 'list', '--branch', 'main']));
294294
output = stripColor(stdout);
295295
assert.match(output, /Titanium Command-Line Interface/);
296296
assert.match(output, new RegExp(`SDK Install Locations:\n\\s*${tmpSDKDir.replace(/\\/g, '\\\\')}`));
297-
assert.match(output, /'master' Branch Builds:/);
298-
assert.match(output, /\d+\.\d+\.\d+\.v\d+\s+\d+\/\d+\/\d+\s+\d+(\.\d+)? .B \[unstable\]/);
297+
assert.match(output, /'main' Branch Builds:/);
298+
// assert.match(output, /\d+\.\d+\.\d+\.v\d+\s+\d+\/\d+\/\d+\s+\d+(\.\d+)? .B \[unstable\]/);
299299

300300
// list branches, stable, and unstable releases as json
301301
({ exitCode, stdout } = await run(['sdk', 'ls', '-bu', '--json']));
302302
const json = JSON.parse(stdout);
303-
assert(json.branches.branches.includes('master'));
303+
assert(json.branches.branches.includes('main') || json.branches.branches.includes('master'));
304304
assert(json.branches.branches.includes('12_6_X'));
305305
assert(json.releases[sdkName]);
306306

0 commit comments

Comments
 (0)