发布 SDK 0.6.0 并补充场标定使用说明

支持不带前缀的版本标签,保留 Finger 资产随 wheel 交付。发布工具 97 项回归及 SDK 自带资产的场标定录像验证通过。
This commit is contained in:
ykcheungab
2026-10-19 20:56:00 +08:00
parent 0a042c7fbf
commit dc8a630df3
6 changed files with 57 additions and 9 deletions
+11 -3
View File
@@ -338,7 +338,8 @@ def test_publish_dry_run_resumes_when_tag_already_exists(tmp_path, monkeypatch,
assert "gh release create v1.2.3" in output
def test_publish_dry_run_creates_tag_when_absent(tmp_path, monkeypatch, capsys):
@pytest.mark.parametrize("tag", [None, "1.2.4"])
def test_publish_dry_run_creates_tag_when_absent(tmp_path, monkeypatch, capsys, tag):
sdk, release, wheel = _synthetic_publish_layout(tmp_path, "1.2.4", tag_exists=False)
monkeypatch.setattr(github, "REPO_ROOT", sdk)
monkeypatch.setattr(github, "MANIFEST_PATH", sdk / "tools" / "downstream_sync_manifest.json")
@@ -346,11 +347,18 @@ def test_publish_dry_run_creates_tag_when_absent(tmp_path, monkeypatch, capsys):
monkeypatch.setattr(github, "_release_exists", lambda repo, tag: False)
exit_code = github.publish(
github.Options(version="1.2.4", apply=False, skip_fetch=True)
github.Options(version="1.2.4", apply=False, skip_fetch=True, tag=tag)
)
output = capsys.readouterr().out
assert exit_code == 0
assert "git tag v1.2.4" in output
expected_tag = tag or "v1.2.4"
assert f"git tag {expected_tag}" in output
assert f"gh release create {expected_tag} --verify-tag --title {expected_tag}" in output
def test_publish_rejects_tag_for_another_version(capsys):
assert github.publish(github.Options(version="1.2.4", tag="1.2.5")) == 1
assert "tag must be" in capsys.readouterr().out
def test_publish_refuses_when_release_already_exists(tmp_path, monkeypatch, capsys):