pull/88/head
parent
1b1a8539c9
commit
120d149c86
|
@ -1 +1,2 @@
|
|||
VUE_APP_PUBLISH_URL=http://dev-sidecar.docmirror.cn/update/
|
||||
VUE_APP_PUBLISH_PROVIDER=generic
|
|
@ -15,6 +15,7 @@ function appendIntro (context, systemType, latest) {
|
|||
})
|
||||
}
|
||||
exports.default = async function (context) {
|
||||
console.log('after-all-artifact-build', context)
|
||||
appendIntro(context, 'mac', 'latest-mac.yml')
|
||||
appendIntro(context, 'win', 'latest.yml')
|
||||
appendIntro(context, 'linux', 'latest-linux.yml')
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
const fs = require('fs')
|
||||
exports.default = async function (context) {
|
||||
// console.log('context', context)
|
||||
if (context.packager.platform.nodeName === 'linux') {
|
||||
fs.copyFileSync('../build/app-update.yml', '../dist_electron/linux_unpacked/resources/app-update.yml')
|
||||
}
|
||||
}
|
|
@ -1,6 +1,22 @@
|
|||
const path = require('path')
|
||||
const AdmZip = require('adm-zip')
|
||||
const pkg = require('../package.json')
|
||||
const fs = require('fs')
|
||||
|
||||
function writeAppUpdateYmlForLinux () {
|
||||
const publishUrl = process.env.VUE_APP_PUBLISH_URL
|
||||
const publishProvider = process.env.VUE_APP_PUBLISH_PROVIDER
|
||||
// provider: generic
|
||||
// url: 'http://dev-sidecar.docmirror.cn/update/preview/'
|
||||
// updaterCacheDirName: '@docmirrordev-sidecar-gui-updater'
|
||||
const fileContent = `provider: ${publishProvider}
|
||||
url: '${publishUrl}'
|
||||
updaterCacheDirName: '@docmirrordev-sidecar-gui-updater'
|
||||
`
|
||||
console.log('write linux app-update.yml,updateUrl:', publishUrl)
|
||||
const filePath = path.resolve('./dist_electron/linux-unpacked/resources/app-update.yml')
|
||||
fs.writeFileSync(filePath, fileContent)
|
||||
}
|
||||
exports.default = async function (context) {
|
||||
// console.log('context', context)
|
||||
let targetPath
|
||||
|
@ -11,6 +27,7 @@ exports.default = async function (context) {
|
|||
} else if (context.packager.platform.nodeName === 'linux') {
|
||||
targetPath = path.join(context.appOutDir, './resources')
|
||||
systemType = 'linux'
|
||||
writeAppUpdateYmlForLinux()
|
||||
} else {
|
||||
targetPath = path.join(context.appOutDir, './resources')
|
||||
systemType = 'win'
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const publishUrl = process.env.VUE_APP_PUBLISH_URL
|
||||
const publishProvider = process.env.VUE_APP_PUBLISH_PROVIDER
|
||||
console.log('publish url', publishUrl)
|
||||
module.exports = {
|
||||
pages: {
|
||||
|
@ -38,7 +39,7 @@ module.exports = {
|
|||
builderOptions: {
|
||||
afterPack: './pkg/after-pack.js',
|
||||
afterAllArtifactBuild: './pkg/after-all-artifact-build.js',
|
||||
afterPackContent: './pkg/after-pack-content.js',
|
||||
// artifactBuildCompleted: './pkg/artifact-build-completed.js',
|
||||
// builderOptions: {
|
||||
// publish: ['github']// 此处写入github 就好,不用添加其他内容
|
||||
// },
|
||||
|
@ -68,12 +69,12 @@ module.exports = {
|
|||
linux: {
|
||||
icon: 'build/mac/',
|
||||
target: [
|
||||
'deb',
|
||||
// 'deb',
|
||||
'AppImage'
|
||||
]
|
||||
},
|
||||
publish: {
|
||||
provider: 'generic',
|
||||
provider: publishProvider,
|
||||
url: publishUrl
|
||||
// url: 'http://dev-sidecar.docmirror.cn/update/preview/'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue