mirror of
https://github.com/tauri-apps/tauri-action.git
synced 2026-01-31 00:35:20 +01:00
fix: process multiple config flags (#1240)
This commit is contained in:
5
dist/index.js
vendored
5
dist/index.js
vendored
@@ -86481,6 +86481,7 @@ const parsedArgs_ = (0,external_node_util_.parseArgs)({
|
||||
config: {
|
||||
type: 'string',
|
||||
short: 'c',
|
||||
multiple: true,
|
||||
},
|
||||
debug: { type: 'boolean', short: 'd' },
|
||||
},
|
||||
@@ -97546,7 +97547,9 @@ function getInfo(targetInfo, configFlag) {
|
||||
config.mergePlatformConfig(tauriDir, targetInfo.platform);
|
||||
}
|
||||
if (configFlag) {
|
||||
config.mergeUserConfig(inputs/* projectPath */.DZ, configFlag);
|
||||
for (const c of configFlag) {
|
||||
config.mergeUserConfig(inputs/* projectPath */.DZ, c);
|
||||
}
|
||||
}
|
||||
name = config?.productName;
|
||||
if (config.version?.endsWith('.json')) {
|
||||
|
||||
@@ -27,7 +27,7 @@ export async function buildProject(): Promise<Artifact[]> {
|
||||
const runner = await getRunner();
|
||||
|
||||
const targetPath = parsedArgs['target'] as string | undefined;
|
||||
const configArg = parsedArgs['config'] as string | undefined;
|
||||
const configArg = parsedArgs['config'] as string[] | undefined;
|
||||
const profile = parsedRunnerArgs['profile'] as string | undefined;
|
||||
|
||||
const targetInfo = getTargetInfo(targetPath);
|
||||
|
||||
@@ -32,7 +32,7 @@ async function run(): Promise<void> {
|
||||
let body = core.getInput('releaseBody');
|
||||
|
||||
const targetPath = parsedArgs['target'] as string | undefined;
|
||||
const configArg = parsedArgs['config'] as string | undefined;
|
||||
const configArg = parsedArgs['config'] as string[] | undefined;
|
||||
|
||||
const artifacts: Artifact[] = [];
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ const parsedArgs_ = parseArgs({
|
||||
config: {
|
||||
type: 'string',
|
||||
short: 'c',
|
||||
multiple: true,
|
||||
},
|
||||
debug: { type: 'boolean', short: 'd' },
|
||||
},
|
||||
|
||||
@@ -490,7 +490,7 @@ export async function execCommand(
|
||||
});
|
||||
}
|
||||
|
||||
export function getInfo(targetInfo?: TargetInfo, configFlag?: string): Info {
|
||||
export function getInfo(targetInfo?: TargetInfo, configFlag?: string[]): Info {
|
||||
const tauriDir = getTauriDir();
|
||||
if (tauriDir !== null) {
|
||||
let name;
|
||||
@@ -505,7 +505,9 @@ export function getInfo(targetInfo?: TargetInfo, configFlag?: string): Info {
|
||||
config.mergePlatformConfig(tauriDir, targetInfo.platform);
|
||||
}
|
||||
if (configFlag) {
|
||||
config.mergeUserConfig(projectPath, configFlag);
|
||||
for (const c of configFlag) {
|
||||
config.mergeUserConfig(projectPath, c);
|
||||
}
|
||||
}
|
||||
|
||||
name = config?.productName;
|
||||
|
||||
Reference in New Issue
Block a user