mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-01-23 14:48:13 -05:00
25 lines
771 B
JavaScript
25 lines
771 B
JavaScript
const pkg = require('../package.json')
|
|
const version = pkg.version
|
|
// TODO: use the same name format
|
|
const generateURL = (platform, ext, prefix = 'PicList-') => {
|
|
return `https://release.piclist.cn/latest/${prefix}${version}${platform}${ext}`
|
|
}
|
|
|
|
const platformExtList = [
|
|
['-arm64', '.dmg', 'PicList-'],
|
|
['-x64', '.dmg', 'PicList-'],
|
|
['-universal', '.dmg', 'PicList-'],
|
|
['', '.AppImage', 'PicList-'],
|
|
['-ia32', '.exe', 'PicList-Setup-'],
|
|
['-x64', '.exe', 'PicList-Setup-'],
|
|
['', '.exe', 'PicList-Setup-'],
|
|
['_amd64', '.snap', 'piclist_']
|
|
]
|
|
|
|
const links = platformExtList.map(([arch, ext, prefix]) => {
|
|
const markdownLink = `[${prefix}${version}${arch}${ext}](${generateURL(arch, ext, prefix)})`
|
|
return markdownLink
|
|
})
|
|
|
|
console.log(links.join('\n'))
|