Skip to content

Commit 0081f61

Browse files
authored
ci: prepare the 0.22 source branch for nightly releases (#4546)
1 parent 41d11fe commit 0081f61

12 files changed

Lines changed: 58 additions & 13 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ on:
1414
push:
1515
branches:
1616
- main
17+
- '0.22'
1718

1819
permissions:
1920
contents: read
2021

21-
# Release and nightly publishing require green CI on the exact main commit, so a
22-
# main push never cancels or replaces another commit's run.
22+
# Release and nightly publishing require green CI on the exact source commit, so a
23+
# push never cancels or replaces another commit's run.
2324
concurrency:
2425
group: >-
2526
ci-${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "agent-device",
3-
"version": "0.21.38-dev",
3+
"version": "0.22.0-dev",
44
"description": "Open source device layer for AI coding agents: a CLI, MCP server, and typed Node.js API to control mobile, web, TV, and desktop apps on devices and simulators, locally or in the cloud.",
55
"mcpName": "io.github.callstack/agent-device",
66
"license": "MIT",

‎packages/provider-revyl/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@agent-device/revyl",
3-
"version": "0.21.38-dev",
3+
"version": "0.22.0-dev",
44
"type": "module",
55
"description": "Revyl cloud iOS simulator and Android emulator plugin for agent-device.",
66
"files": [

‎packages/provider-testmu/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@agent-device/testmu",
3-
"version": "0.21.38-dev",
3+
"version": "0.22.0-dev",
44
"type": "module",
55
"description": "TestMu AI real and virtual mobile device plugin for agent-device.",
66
"files": [

‎packages/provider-tizen/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@agent-device/tizen",
3-
"version": "0.21.38-dev",
3+
"version": "0.22.0-dev",
44
"type": "module",
55
"description": "Samsung Tizen TV web app plugin for agent-device.",
66
"files": [

‎packages/provider-webos/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@agent-device/webos",
3-
"version": "0.21.38-dev",
3+
"version": "0.22.0-dev",
44
"type": "module",
55
"description": "LG webOS TV web app plugin for agent-device.",
66
"files": [

‎packages/proxy/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@agent-device/proxy",
3-
"version": "0.21.38-dev",
3+
"version": "0.22.0-dev",
44
"type": "module",
55
"description": "Transport-neutral authenticating proxy in front of an agent-device daemon.",
66
"license": "MIT",

‎server.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
"url": "https://github.com/callstack/agent-device",
88
"source": "github"
99
},
10-
"version": "0.21.38-dev",
10+
"version": "0.22.0-dev",
1111
"packages": [
1212
{
1313
"registryType": "npm",
1414
"identifier": "agent-device",
15-
"version": "0.21.38-dev",
15+
"version": "0.22.0-dev",
1616
"transport": {
1717
"type": "stdio"
1818
},

‎src/cli/__tests__/update-check.test.ts‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,3 +252,37 @@ test('a failed check after a channel switch records the new channel and drops th
252252
assert.equal(cache.latestVersion, undefined);
253253
assert.equal(cache.checkedAt, '2026-03-31T10:00:00.000Z');
254254
});
255+
256+
test('a 0.22 nightly follows its own dist-tag and ignores cached main-nightly updates', async () => {
257+
const stateDir = makeTempStateDir();
258+
cleanupPaths.push(stateDir);
259+
const currentVersion = '0.22.0-nightly-0-22.20261113.7';
260+
writeCache(stateDir, { latestVersion: '0.23.0-nightly.20261114.8', distTag: 'nightly' });
261+
assert.equal(
262+
withCapturedStderr(
263+
() => maybeRunUpgradeNotifier({ command: 'devices', currentVersion, stateDir, flags: {} }),
264+
{ interactive: true },
265+
),
266+
'',
267+
);
268+
const fetchMock = vi.fn().mockResolvedValue({
269+
ok: true,
270+
json: async () => ({ version: '0.22.0-nightly-0-22.20261114.8' }),
271+
});
272+
vi.stubGlobal('fetch', fetchMock);
273+
await runUpdateCheckWorker({
274+
cachePath: path.join(stateDir, 'update-check.json'),
275+
currentVersion,
276+
});
277+
assert.equal(
278+
fetchMock.mock.calls[0]?.[0],
279+
'https://registry.npmjs.org/agent-device/nightly-0.22',
280+
);
281+
assert.match(
282+
withCapturedStderr(
283+
() => maybeRunUpgradeNotifier({ command: 'devices', currentVersion, stateDir, flags: {} }),
284+
{ interactive: true },
285+
),
286+
/npm install -g agent-device@nightly-0\.22/,
287+
);
288+
});

‎src/cli/update-check.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,9 @@ function cachedDistTag(cache: UpdateCheckCache): string {
169169
return cache.distTag ?? 'latest';
170170
}
171171

172-
/** A nightly build follows the `nightly` dist-tag; every other build follows `latest`. */
173-
function distTagFor(version: string): 'latest' | 'nightly' {
172+
/** Each nightly follows its source channel; other builds follow `latest`. */
173+
function distTagFor(version: string): 'latest' | 'nightly' | 'nightly-0.22' {
174+
if (version.includes('-nightly-0-22.')) return 'nightly-0.22';
174175
return version.includes('-nightly.') ? 'nightly' : 'latest';
175176
}
176177

0 commit comments

Comments
 (0)