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

Callers 1

SubStorePluginClass · 0.85

Calls 1

shFunction · 0.85

Tested by

no test coverage detected