You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dev-sidecar/packages/gui/pkg/after-all-artifact-build.js

28 lines
913 B

const path = require('path')
const pkg = require('../package.json')
const fs = require('fs')
function appendIntro (context, systemType, latest) {
3 years ago
const version = pkg.version
const partUpdateFile = `update-${systemType}-${version}.zip`
const partUpdateUrl = context.configuration.publish.url + partUpdateFile
const latestFilePath = path.join(context.outDir, latest)
3 years ago
fs.appendFile(latestFilePath, `partPackage: ${partUpdateUrl}\n
releaseNotes: \n
3 years ago
- 升级日志\n
- https://download.fastgit.org/docmirror/dev-sidecar/releases/download/v${version}/DevSidecar-${version}.exe\n`,
3 years ago
(err) => {
if (err) {
console.log('修改latest 失败')
}
})
}
exports.default = async function (context) {
3 years ago
console.log('after-all-artifact-build')
appendIntro(context, 'mac', 'latest-mac.yml')
appendIntro(context, 'win', 'latest.yml')
3 years ago
appendIntro(context, 'linux', 'latest-linux.yml')
}