MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / getRemoteVersion

Function getRemoteVersion

sub/sub.ts:92–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90
91// 获取远程最新版本
92async function getRemoteVersion(): Promise<string> {
93 try {
94 const response = await sh(
95 "curl -s https://api.github.com/repos/sub-store-org/Sub-Store/releases/latest"
96 );
97 const releaseData = JSON.parse(response);
98 return releaseData.tag_name || "获取失败";
99 } catch (error: any) {
100 return "获取失败";
101 }
102}
103
104// 比较版本号
105function compareVersions(local: string, remote: string): {

Callers 1

SubStorePluginClass · 0.85

Calls 1

shFunction · 0.85

Tested by

no test coverage detected