From e28fa1c532b84093c1a790de99df84d62a2dbe1a Mon Sep 17 00:00:00 2001 From: Mucheen <145200703+Mucheen@users.noreply.github.com> Date: Tue, 24 Nov 2026 17:35:13 +0800 Subject: [PATCH] chore(release): prepare Python Support v1.2.1 --- docs/releases/v1.2.1.md | 17 +++++++++++++++++ io.github.lithe-idea.python-support/plugin.json | 2 +- scripts/ci/release/publish.test.mjs | 14 ++++++++++++-- 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 docs/releases/v1.2.1.md diff --git a/docs/releases/v1.2.1.md b/docs/releases/v1.2.1.md new file mode 100644 index 0000000..8d5c8f6 --- /dev/null +++ b/docs/releases/v1.2.1.md @@ -0,0 +1,17 @@ +## 中文 + +- 支持插件增量更新。支持该功能的 Lithe 桌面端在保留了匹配的旧安装包时,可以下载较小的补丁来更新 Python Support。首次安装、旧包缺失或补丁校验失败时,仍可使用完整安装包。 + +### 升级与兼容性 + +系统与插件协议要求与 Python Support 1.2.0 一致。调试仍需要 Python 3.10 或更新版本。 + +--- + +## English + +- Python Support now provides delta updates. Lithe desktop versions that support this feature can download a smaller patch when the matching previous archive is available. The full archive is available for first-time installs, when the previous archive is missing, and when patch verification fails. + +### Upgrade and compatibility + +System and plugin protocol requirements are the same as in Python Support 1.2.0. Debugging still requires Python 3.10 or later. diff --git a/io.github.lithe-idea.python-support/plugin.json b/io.github.lithe-idea.python-support/plugin.json index b51c5c1..8404d71 100644 --- a/io.github.lithe-idea.python-support/plugin.json +++ b/io.github.lithe-idea.python-support/plugin.json @@ -2,7 +2,7 @@ "schemaVersion": 0, "id": "io.github.lithe-idea.python-support", "displayName": "Python Support", - "version": "1.2.0", + "version": "1.2.1", "vendor": { "id": "io.github.lithe-idea", "displayName": "Lithe Community", diff --git a/scripts/ci/release/publish.test.mjs b/scripts/ci/release/publish.test.mjs index 85e74ff..a72dbf7 100644 --- a/scripts/ci/release/publish.test.mjs +++ b/scripts/ci/release/publish.test.mjs @@ -1,6 +1,6 @@ import assert from "node:assert/strict"; import { execFileSync, spawnSync } from "node:child_process"; -import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs"; +import { copyFileSync, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; import test from "node:test"; @@ -10,6 +10,10 @@ const publishStep = workflow.match(/^ {6}- name: Publish GitHub Release\n(?: {8} assert.ok(publishStep, "Could not find the release workflow's publish step"); const publishScript = publishStep[1].replace(/^ {10}/gm, ""); const recordReleaseArgs = 'gh() { printf "%s\\n" "$@" > "$RELEASE_ARGS"; }\n'; +const serveStoreIndex = `curl() { + [[ "\${!#}" == https://raw.githubusercontent.com/Lithe-IDEA/Lithe-store/HEAD/lithe-plugin-index.json ]] || return 1 + printf '{"plugins":[]}\\n' > "\${@: -2:1}" +}\n`; const gitEnv = { PATH: process.env.PATH, @@ -44,6 +48,11 @@ function releaseFixture(t, tag = "v1.0.0", tagOptions = []) { mkdirSync(join(checkout, "docs", "releases"), { recursive: true }); mkdirSync(join(checkout, "dist")); + mkdirSync(join(checkout, "scripts", "package"), { recursive: true }); + copyFileSync( + new URL("../../package/release-deltas.sh", import.meta.url), + join(checkout, "scripts", "package", "release-deltas.sh"), + ); writeFileSync(join(checkout, "docs", "releases", `${tag}.md`), "Release notes\n"); writeFileSync(join(checkout, "dist", "python-support.zip"), "Test archive contents\n"); @@ -58,7 +67,7 @@ function releaseFixture(t, tag = "v1.0.0", tagOptions = []) { git(checkout, "push", "-q", "origin", `:${ref}`); }, publish() { - const result = spawnSync("bash", ["--noprofile", "--norc", "-e", "-c", recordReleaseArgs + publishScript], { + const result = spawnSync("bash", ["--noprofile", "--norc", "-e", "-c", recordReleaseArgs + serveStoreIndex + publishScript], { cwd: checkout, encoding: "utf8", timeout: 5000, @@ -81,6 +90,7 @@ test("publish uses the unchanged lightweight release tag", (t) => { const fixture = releaseFixture(t); const result = fixture.publish(); assert.equal(result.status, 0, result.stdout + result.stderr); + assert.match(result.stdout, /Checked for optional plugin deltas/); const args = readFileSync(fixture.cliLog, "utf8").trimEnd().split("\n"); assert.deepEqual(args.slice(0, 3), ["release", "create", "v1.0.0"]); assert.ok(args.includes("--verify-tag"));