mirror of
https://github.com/kuaifan/dootask.git
synced 2026-06-08 00:18:45 +00:00
no message
This commit is contained in:
parent
2b36fdb4e3
commit
ea5a6f4878
@ -1149,14 +1149,16 @@ class SystemController extends AbstractController
|
||||
$package = Base::getPackage();
|
||||
$array = [
|
||||
'version' => Base::getVersion(),
|
||||
'publish' => Arr::get($package, 'app.0.publish'),
|
||||
'publish' => [],
|
||||
];
|
||||
if (is_array($package['app'])) {
|
||||
$i = 0;
|
||||
foreach ($package['app'] as $item) {
|
||||
$urls = $item['urls'] && is_array($item['urls']) ? $item['urls'] : $item['url'];
|
||||
if (is_array($item['publish']) && Base::hostContrast($url, $urls)) {
|
||||
if (is_array($item['publish']) && ($i === 0 || Base::hostContrast($url, $urls))) {
|
||||
$array['publish'] = $item['publish'];
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
return $array;
|
||||
|
||||
6
electron/build.js
vendored
6
electron/build.js
vendored
@ -161,6 +161,7 @@ function startBuild(data, publish, release) {
|
||||
fse.copySync(packageFile, packageBakFile)
|
||||
// package.json Generated
|
||||
const econfig = require('./package.json')
|
||||
let npmArg = data.platform
|
||||
let appName = utils.getDomain(data.url)
|
||||
if (appName === "public") appName = "DooTask"
|
||||
econfig.name = data.name;
|
||||
@ -184,16 +185,17 @@ function startBuild(data, publish, release) {
|
||||
"owner": repository[0],
|
||||
"repo": repository[1]
|
||||
}
|
||||
npmArg = `${npmArg}-publish`
|
||||
}
|
||||
fs.writeFileSync(packageFile, JSON.stringify(econfig, null, 2), 'utf8');
|
||||
// build
|
||||
child_process.spawnSync("npm" + comSuffix, ["run", data.platform], {stdio: "inherit", cwd: "electron"});
|
||||
child_process.spawnSync("npm" + comSuffix, ["run", npmArg], {stdio: "inherit", cwd: "electron"});
|
||||
// package.json Recovery
|
||||
fse.copySync(packageBakFile, packageFile)
|
||||
// publish generic method
|
||||
if (publish === true && process.env.DP_KEY) {
|
||||
genericPublish({
|
||||
url: data.publish,
|
||||
url: data.publish.url,
|
||||
key: process.env.DP_KEY,
|
||||
version: config.version,
|
||||
output: econfig.build.directories.output
|
||||
|
||||
10
package.json
10
package.json
@ -71,7 +71,15 @@
|
||||
"id": "com.dootask.task",
|
||||
"name": "DooTask",
|
||||
"url": "http://public/",
|
||||
"publish": "https://www.dootask.com/desktop/publish"
|
||||
"urls": [
|
||||
"https://dootask.com/",
|
||||
"https://www.dootask.com/",
|
||||
"https://t.hitosea.com/"
|
||||
],
|
||||
"publish": {
|
||||
"provider": "generic",
|
||||
"url": "https://www.dootask.com/desktop/publish"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user