Files
shadowcz007-comfyui-mixlab-…/web/javascript/checkVersion.js
T
2023-11-30 23:50:43 +08:00

24 lines
828 B
JavaScript

const repoOwner = 'shadowcz007' // 替换为仓库的所有者
const repoName = 'comfyui-mixlab-nodes' // 替换为仓库的名称
const version='v0.2'
fetch(`https://api.github.com/repos/${repoOwner}/${repoName}/releases/latest`)
.then(response => response.json())
.then(data => {
const latestVersion = data.tag_name
console.log('Latest release version:', latestVersion)
if(latestVersion!=version){
window.alert(
`Please proceed to the official repository to download the latest version.https://github.com/shadowcz007/comfyui-mixlab-nodes/releases/`
)
window.open(
'https://github.com/shadowcz007/comfyui-mixlab-nodes/releases/'
)
}
})
.catch(error => {
console.error('Error fetching release information:', error)
})
// #MixCopilot