PicList/scripts/link.js

26 lines
990 B
JavaScript
Raw Normal View History

2022-07-16 23:51:46 -04:00
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}`
2022-07-16 23:51:46 -04:00
}
const template = `
### 加速下载地址
2022-07-16 23:51:46 -04:00
#### MacOS
[PicList-${version}-arm64.dmg](${generateURL('-arm64', '.dmg', 'PicList-')})
[PicList-${version}-x64.dmg](${generateURL('-x64', '.dmg', 'PicList-')})
[PicList-${version}-universal.dmg](${generateURL('-universal', '.dmg', 'PicList-')})
2022-07-16 23:51:46 -04:00
#### Windows
[PicList-Setup-${version}-ia32.exe](${generateURL('-ia32', '.exe', 'PicList-Setup-')})
[PicList-Setup-${version}-x64.exe](${generateURL('-x64', '.exe', 'PicList-Setup-')})
[PicList-Setup-${version}.exe](${generateURL('', '.exe', 'PicList-Setup-')})
#### Linux
[PicList-${version}.AppImage](${generateURL('', '.AppImage', 'PicList-')})
[piclist_${version}_amd64.snap](${generateURL('_amd64', '.snap', 'piclist_')})`
console.log(template)