2022-07-16 23:51:46 -04:00
|
|
|
const pkg = require('../package.json')
|
|
|
|
const version = pkg.version
|
|
|
|
// TODO: use the same name format
|
2023-02-15 10:36:47 -05:00
|
|
|
const generateURL = (platform, ext, prefix = 'PicList-') => {
|
2023-04-05 10:55:35 -04:00
|
|
|
return `https://release.piclist.cn/latest/${prefix}${version}${platform}${ext}`
|
2022-07-16 23:51:46 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
const platformExtList = [
|
2023-02-15 10:36:47 -05:00
|
|
|
['-arm64', '.dmg', 'PicList-'],
|
|
|
|
['-x64', '.dmg', 'PicList-'],
|
2023-04-05 10:55:35 -04:00
|
|
|
['-universal', '.dmg', 'PicList-'],
|
2023-02-15 10:36:47 -05:00
|
|
|
['', '.AppImage', 'PicList-'],
|
|
|
|
['-ia32', '.exe', 'PicList-Setup-'],
|
|
|
|
['-x64', '.exe', 'PicList-Setup-'],
|
|
|
|
['', '.exe', 'PicList-Setup-'],
|
|
|
|
['_amd64', '.snap', 'piclist_']
|
2022-07-16 23:51:46 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
const links = platformExtList.map(([arch, ext, prefix]) => {
|
|
|
|
const markdownLink = `[${prefix}${version}${arch}${ext}](${generateURL(arch, ext, prefix)})`
|
|
|
|
return markdownLink
|
|
|
|
})
|
|
|
|
|
|
|
|
console.log(links.join('\n'))
|