fix: process multiple config flags (#1240)

This commit is contained in:
Fabian-Lars
2026-01-03 12:26:03 +01:00
committed by GitHub
parent 7efe013fbe
commit c56c569a78
5 changed files with 11 additions and 5 deletions

5
dist/index.js vendored
View File

@@ -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')) {

View File

@@ -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);

View File

@@ -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[] = [];

View File

@@ -33,6 +33,7 @@ const parsedArgs_ = parseArgs({
config: {
type: 'string',
short: 'c',
multiple: true,
},
debug: { type: 'boolean', short: 'd' },
},

View File

@@ -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;