mirror of
				https://github.com/JonasKruckenberg/tauri-build.git
				synced 2025-10-31 16:23:55 +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' | ||||
|   target: | ||||
|     description: 'The target triple to build against' | ||||
|   debug: | ||||
|     description: 'Builds with the debug flag' | ||||
|     default: 'false' | ||||
| outputs: | ||||
|   artifacts: | ||||
|     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); | ||||
|         } | ||||
|         yield (0, execa_1.execa)(runner, args, { cwd: projectPath }); | ||||
|         const profile = options.debug ? 'debug' : 'release'; | ||||
|         const outDir = options.target | ||||
|             ? `./target/${options.target}/release/bundle` | ||||
|             : `./target/release/bundle`; | ||||
|             ? `./target/${options.target}/${profile}/bundle` | ||||
|             : `./target/${profile}/bundle`; | ||||
|         const macOSExts = ['app', 'app.tar.gz', 'app.tar.gz.sig', 'dmg']; | ||||
|         const linuxExts = [ | ||||
|             'AppImage', | ||||
| @ -106,7 +107,8 @@ function run() { | ||||
|                 args: (0, string_argv_1.default)(core.getInput('args')), | ||||
|                 projectPath: core.getInput('projectPath'), | ||||
|                 configPath: core.getInput('configPath'), | ||||
|                 target: core.getInput('target') | ||||
|                 target: core.getInput('target'), | ||||
|                 debug: core.getBooleanInput('debug') | ||||
|             }); | ||||
|             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 | ||||
|   projectPath?: string | ||||
|   configPath?: string | ||||
|   debug?: boolean | ||||
|   args?: string[] | ||||
|   target?: string | ||||
| } | ||||
| @ -25,9 +26,11 @@ export async function buildProject(options: BuildOptions): Promise<string[]> { | ||||
| 
 | ||||
|   await execa(runner, args, {cwd: projectPath}) | ||||
| 
 | ||||
|   const profile = options.debug ? 'debug' : 'release' | ||||
|   const outDir = options.target | ||||
|     ? `./target/${options.target}/release/bundle` | ||||
|     : `./target/release/bundle` | ||||
|     ? `./target/${options.target}/${profile}/bundle` | ||||
|     : `./target/${profile}/bundle` | ||||
| 
 | ||||
|   const macOSExts = ['app', 'app.tar.gz', 'app.tar.gz.sig', 'dmg'] | ||||
|   const linuxExts = [ | ||||
|     'AppImage', | ||||
|  | ||||
| @ -9,7 +9,8 @@ async function run(): Promise<void> { | ||||
|       args: stringArgv(core.getInput('args')), | ||||
|       projectPath: core.getInput('projectPath'), | ||||
|       configPath: core.getInput('configPath'), | ||||
|       target: core.getInput('target') | ||||
|       target: core.getInput('target'), | ||||
|       debug: core.getBooleanInput('debug') | ||||
|     }) | ||||
| 
 | ||||
|     core.setOutput('artifacts', artifacts.join('\n')) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user