You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(bundle): add --no-sign flag to skip code signing in bundling pro… (#14052)
* feat(bundle): add --no-sign flag to skip code signing in bundling process
- Introduce a
o_sign option in bundle settings to allow skipping code signing
- Update macOS and Windows bundler implementations to respect the flag
- Wire up CLI option --no-sign to control signing behavior during bundling
- Add necessary config and type changes to propagate the flag throughout bundler
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* ci: added yml for github action testing
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* fix: fixed field 'digest_algorithm' is already declared error
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* ci: updated to test the new features as well
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* ci: fixed yml issue
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* fix: fixed missing parameter issue in android sign.rs
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* chore: apply linting
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* chore: remove redundant files
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* chore: revert indentations
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* fix: added parameters to ios mobile build.rs
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* docs: updated documentation for settigs.rs
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* docs(cli): add documentation for
o_sign flag in build options
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* chore: apply cargo fmt
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* docs: added CHANGES.md
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* refactor(bundler): make
o_sign private and add getter
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* fix: minor error
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* refactor: revert build_benchmark_jsons.rs
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
* impl for macos too
* fix ci
* fix windows build
---------
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Add a `--no-sign` flag to the `tauri build` and `tauri bundle` commands to skip the code signing step, improving the developer experience for local testing and development without requiring code signing keys.
// Sign windows binaries before the bundling step in case neither wix and nsis bundles are enabled
88
-
ifmatches!(target_os,TargetPlatform::Windows){
89
-
if settings.can_sign(){
90
-
for bin in settings.binaries(){
91
-
if bin.main(){
92
-
// we will sign the main binary after patching per "package type"
93
-
continue;
94
-
}
95
-
let bin_path = settings.binary_path(bin);
96
-
windows::sign::try_sign(&bin_path, settings)?;
97
-
}
98
-
99
-
// Sign the sidecar binaries
100
-
for bin in settings.external_binaries(){
101
-
let path = bin?;
102
-
let skip = std::env::var("TAURI_SKIP_SIDECAR_SIGNATURE_CHECK").is_ok_and(|v| v == "true");
103
-
if skip {
104
-
continue;
105
-
}
106
-
107
-
#[cfg(windows)]
108
-
if windows::sign::verify(&path)? {
109
-
log::info!(
110
-
"sidecar at \"{}\" already signed. Skipping...",
111
-
path.display()
112
-
);
113
-
continue;
114
-
}
115
-
116
-
windows::sign::try_sign(&path, settings)?;
117
-
}
118
-
}else{
119
-
#[cfg(not(target_os = "windows"))]
120
-
log::warn!("Signing, by default, is only supported on Windows hosts, but you can specify a custom signing command in `bundler > windows > sign_command`, for now, skipping signing the installer...");
log::info!("Skipping binary signing due to --no-sign flag.");
280
+
returnOk(());
281
+
}
282
+
283
+
for bin in settings.binaries(){
284
+
if bin.main(){
285
+
// we will sign the main binary after patching per "package type"
286
+
continue;
287
+
}
288
+
let bin_path = settings.binary_path(bin);
289
+
windows::sign::try_sign(&bin_path, settings)?;
290
+
}
291
+
292
+
// Sign the sidecar binaries
293
+
for bin in settings.external_binaries(){
294
+
let path = bin?;
295
+
let skip = std::env::var("TAURI_SKIP_SIDECAR_SIGNATURE_CHECK").is_ok_and(|v| v == "true");
296
+
if skip {
297
+
continue;
298
+
}
299
+
300
+
#[cfg(windows)]
301
+
if windows::sign::verify(&path)? {
302
+
log::info!(
303
+
"sidecar at \"{}\" already signed. Skipping...",
304
+
path.display()
305
+
);
306
+
continue;
307
+
}
308
+
309
+
windows::sign::try_sign(&path, settings)?;
310
+
}
311
+
}else{
312
+
#[cfg(not(target_os = "windows"))]
313
+
log::warn!("Signing, by default, is only supported on Windows hosts, but you can specify a custom signing command in `bundler > windows > sign_command`, for now, skipping signing the installer...");
314
+
}
315
+
}
316
+
317
+
Ok(())
318
+
}
319
+
308
320
/// Check to see if there are icons in the settings struct
0 commit comments