mirror of
https://github.com/JonasKruckenberg/tauri-build.git
synced 2025-08-14 21:05:05 +00:00
add support for debug builds
This commit is contained in:
parent
81ef53b03b
commit
9133a3c917
@ -15,6 +15,9 @@ inputs:
|
|||||||
default: 'tauri.conf.json'
|
default: 'tauri.conf.json'
|
||||||
target:
|
target:
|
||||||
description: 'The target triple to build against'
|
description: 'The target triple to build against'
|
||||||
|
debug:
|
||||||
|
description: 'Builds with the debug flag'
|
||||||
|
default: 'false'
|
||||||
outputs:
|
outputs:
|
||||||
artifacts:
|
artifacts:
|
||||||
description: ''
|
description: ''
|
||||||
|
8
dist/index.js
generated
vendored
8
dist/index.js
generated
vendored
@ -35,9 +35,10 @@ function buildProject(options) {
|
|||||||
args.push('--target', options.target);
|
args.push('--target', options.target);
|
||||||
}
|
}
|
||||||
yield (0, execa_1.execa)(runner, args, { cwd: projectPath });
|
yield (0, execa_1.execa)(runner, args, { cwd: projectPath });
|
||||||
|
const profile = options.debug ? 'debug' : 'release';
|
||||||
const outDir = options.target
|
const outDir = options.target
|
||||||
? `./target/${options.target}/release/bundle`
|
? `./target/${options.target}/${profile}/bundle`
|
||||||
: `./target/release/bundle`;
|
: `./target/${profile}/bundle`;
|
||||||
const macOSExts = ['app', 'app.tar.gz', 'app.tar.gz.sig', 'dmg'];
|
const macOSExts = ['app', 'app.tar.gz', 'app.tar.gz.sig', 'dmg'];
|
||||||
const linuxExts = [
|
const linuxExts = [
|
||||||
'AppImage',
|
'AppImage',
|
||||||
@ -106,7 +107,8 @@ function run() {
|
|||||||
args: (0, string_argv_1.default)(core.getInput('args')),
|
args: (0, string_argv_1.default)(core.getInput('args')),
|
||||||
projectPath: core.getInput('projectPath'),
|
projectPath: core.getInput('projectPath'),
|
||||||
configPath: core.getInput('configPath'),
|
configPath: core.getInput('configPath'),
|
||||||
target: core.getInput('target')
|
target: core.getInput('target'),
|
||||||
|
debug: core.getBooleanInput('debug')
|
||||||
});
|
});
|
||||||
core.setOutput('artifacts', artifacts.join('\n'));
|
core.setOutput('artifacts', artifacts.join('\n'));
|
||||||
}
|
}
|
||||||
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -6,6 +6,7 @@ interface BuildOptions {
|
|||||||
runner?: string
|
runner?: string
|
||||||
projectPath?: string
|
projectPath?: string
|
||||||
configPath?: string
|
configPath?: string
|
||||||
|
debug?: boolean
|
||||||
args?: string[]
|
args?: string[]
|
||||||
target?: string
|
target?: string
|
||||||
}
|
}
|
||||||
@ -25,9 +26,11 @@ export async function buildProject(options: BuildOptions): Promise<string[]> {
|
|||||||
|
|
||||||
await execa(runner, args, {cwd: projectPath})
|
await execa(runner, args, {cwd: projectPath})
|
||||||
|
|
||||||
|
const profile = options.debug ? 'debug' : 'release'
|
||||||
const outDir = options.target
|
const outDir = options.target
|
||||||
? `./target/${options.target}/release/bundle`
|
? `./target/${options.target}/${profile}/bundle`
|
||||||
: `./target/release/bundle`
|
: `./target/${profile}/bundle`
|
||||||
|
|
||||||
const macOSExts = ['app', 'app.tar.gz', 'app.tar.gz.sig', 'dmg']
|
const macOSExts = ['app', 'app.tar.gz', 'app.tar.gz.sig', 'dmg']
|
||||||
const linuxExts = [
|
const linuxExts = [
|
||||||
'AppImage',
|
'AppImage',
|
||||||
|
@ -9,7 +9,8 @@ async function run(): Promise<void> {
|
|||||||
args: stringArgv(core.getInput('args')),
|
args: stringArgv(core.getInput('args')),
|
||||||
projectPath: core.getInput('projectPath'),
|
projectPath: core.getInput('projectPath'),
|
||||||
configPath: core.getInput('configPath'),
|
configPath: core.getInput('configPath'),
|
||||||
target: core.getInput('target')
|
target: core.getInput('target'),
|
||||||
|
debug: core.getBooleanInput('debug')
|
||||||
})
|
})
|
||||||
|
|
||||||
core.setOutput('artifacts', artifacts.join('\n'))
|
core.setOutput('artifacts', artifacts.join('\n'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user