dev-sidecar/packages/gui/pkg/after-all-artifact-build.js

23 lines
773 B
JavaScript
Raw Normal View History

2021-04-03 10:29:54 +00:00
const path = require('path')
const pkg = require('../package.json')
const fs = require('fs')
function appendIntro (context, systemType, latest) {
const partUpdateFile = `update-${systemType}-${pkg.version}.zip`
const partUpdateUrl = context.configuration.publish.url + partUpdateFile
const latestFilePath = path.join(context.outDir, latest)
fs.appendFile(latestFilePath, `\npartPackage: ${partUpdateUrl}\nreleaseNotes: \n - 升级日志`, (err) => {
if (err) {
console.log('修改latest 失败')
}
})
}
exports.default = async function (context) {
2021-08-18 02:30:54 +00:00
console.log('after-all-artifact-build', context)
2021-04-03 10:29:54 +00:00
appendIntro(context, 'mac', 'latest-mac.yml')
appendIntro(context, 'win', 'latest.yml')
2021-08-17 13:16:39 +00:00
appendIntro(context, 'linux', 'latest-linux.yml')
2021-04-03 10:29:54 +00:00
}