mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-19 06:53:53 +00:00
一键编译所有generic
This commit is contained in:
parent
687b9ca8b1
commit
8cdbb969ff
21
electron/build.js
vendored
21
electron/build.js
vendored
@ -129,7 +129,7 @@ function startBuild(data, publish) {
|
|||||||
econfig.name = data.name;
|
econfig.name = data.name;
|
||||||
econfig.version = config.version;
|
econfig.version = config.version;
|
||||||
econfig.build.appId = data.id;
|
econfig.build.appId = data.id;
|
||||||
econfig.build.directories.output = `dist/${data.platform}`;
|
econfig.build.directories.output = `dist/${data.id}/${data.platform}`;
|
||||||
econfig.build.artifactName = utils.getDomain(data.url) + "-v${version}-${os}-${arch}.${ext}";
|
econfig.build.artifactName = utils.getDomain(data.url) + "-v${version}-${os}-${arch}.${ext}";
|
||||||
econfig.build.nsis.artifactName = utils.getDomain(data.url) + "-v${version}-${os}-${arch}.${ext}";
|
econfig.build.nsis.artifactName = utils.getDomain(data.url) + "-v${version}-${os}-${arch}.${ext}";
|
||||||
if (!process.env.APPLEID || !process.env.APPLEIDPASS) {
|
if (!process.env.APPLEID || !process.env.APPLEIDPASS) {
|
||||||
@ -177,10 +177,14 @@ if (["dev"].includes(argv[2])) {
|
|||||||
let appChoices = [];
|
let appChoices = [];
|
||||||
config.app.forEach(data => {
|
config.app.forEach(data => {
|
||||||
appChoices.push({
|
appChoices.push({
|
||||||
name: data.name,
|
name: `${data.name} (${data.publish.provider})`,
|
||||||
value: data
|
value: data
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
appChoices.push({
|
||||||
|
name: "All generic",
|
||||||
|
value: 'generic'
|
||||||
|
})
|
||||||
const questions = [
|
const questions = [
|
||||||
{
|
{
|
||||||
type: 'list',
|
type: 'list',
|
||||||
@ -218,9 +222,16 @@ if (["dev"].includes(argv[2])) {
|
|||||||
];
|
];
|
||||||
inquirer.prompt(questions).then(answers => {
|
inquirer.prompt(questions).then(answers => {
|
||||||
answers.platform.forEach(platform => {
|
answers.platform.forEach(platform => {
|
||||||
let data = answers.app;
|
let array = [];
|
||||||
data.platform = platform
|
if (answers.app === 'generic') {
|
||||||
startBuild(data, answers.publish)
|
array = config.app.filter(({publish}) => publish.provider === 'generic')
|
||||||
|
} else {
|
||||||
|
array.push(answers.app)
|
||||||
|
}
|
||||||
|
array.forEach(data => {
|
||||||
|
data.platform = platform
|
||||||
|
startBuild(data, answers.publish)
|
||||||
|
})
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user