mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-01-23 22:58:14 -05:00
24 lines
736 B
JavaScript
24 lines
736 B
JavaScript
|
const pkg = require('../package.json')
|
||
|
const version = pkg.version
|
||
|
// TODO: use the same name format
|
||
|
const generateURL = (platform, ext, prefix = 'PicGo-') => {
|
||
|
return `https://picgo-1251750343.cos.ap-chengdu.myqcloud.com/${prefix}${version}${platform}${ext}`
|
||
|
}
|
||
|
|
||
|
const platformExtList = [
|
||
|
['-arm64', '.dmg', 'PicGo-'],
|
||
|
['-x64', '.dmg', 'PicGo-'],
|
||
|
['', '.AppImage', 'PicGo-'],
|
||
|
['-ia32', '.exe', 'PicGo-Setup-'],
|
||
|
['-x64', '.exe', 'PicGo-Setup-'],
|
||
|
['', '.exe', 'PicGo-Setup-'],
|
||
|
['_amd64', '.snap', 'picgo_']
|
||
|
]
|
||
|
|
||
|
const links = platformExtList.map(([arch, ext, prefix]) => {
|
||
|
const markdownLink = `[${prefix}${version}${arch}${ext}](${generateURL(arch, ext, prefix)})`
|
||
|
return markdownLink
|
||
|
})
|
||
|
|
||
|
console.log(links.join('\n'))
|