Skip to content

Conversation

@ShigrafS
Copy link
Contributor

Description

This PR addresses an issue where building a Tauri application locally fails if code signing environment variables are not configured. It adds a new --no-sign CLI flag to the tauri build command, allowing developers and contributors to easily create unsigned application bundles for testing and development purposes.


Summary

This PR adds the --no-sign flag to the tauri build command, streamlining the development workflow by allowing unsigned bundles to be built without the need for code signing keys. This is particularly useful for local testing, where the full build and install process can be checked without the overhead of configuring signing certificates.

🧩 Related Issue

Closes #11626
[feat] build without signing cli flag

✨ What's New

  • New CLI Flag: Adds the --no-sign option to tauri build and tauri bundle.
  • Bundler Logic: Updates the tauri-bundler to check for this flag and skip the code signing step for both macOS and Windows.
  • Codebase Integration: A new no_sign field is added to the bundler's Settings struct to pass this flag's state through the build pipeline.

💡 Why This Matters

  • Improved Developer Experience: Simplifies the build process for contributors and new developers who don't have access to signing keys.
  • Faster Iteration: Allows for rapid testing of the installer, uninstaller, and updater functionality without the time-consuming signing process.
  • Flexibility: Provides a native CLI solution, eliminating the need for workarounds like using separate configuration files for local builds.

How has this PR been tested?

  • Local Builds: Tested with and without the --no-sign flag on both macOS and Windows to ensure that the signing process is correctly skipped.
  • Logic Verification: Confirmed that the no_sign flag is properly handled within tauri-bundler, preventing the call to the signing functions.

Is this a breaking change?

  • No. This change adds a new, optional flag and does not modify any existing functionality.

Does this PR require an update to the documentation?

  • Yes. The tauri build and tauri bundle CLI references should be updated to include the new --no-sign flag and its purpose.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes

@github-project-automation github-project-automation bot moved this to 📬Proposal in Roadmap Aug 21, 2025
@ShigrafS ShigrafS marked this pull request as ready for review August 21, 2025 14:06
@ShigrafS ShigrafS requested a review from a team as a code owner August 21, 2025 14:06
@ShigrafS
Copy link
Contributor Author

Hi @Legend-Master
This PR ready.
Kindly review it.

@Legend-Master
Copy link
Contributor

Thanks for the PR, but before a proper review, first I'll need ask you to cleanup the unrelated changes and things like // <-- ADDED THIS LINE TO FIX THE COMPILER ERROR 😂

@ShigrafS
Copy link
Contributor Author

Sure!
I'll make changes, verify build and ping you.

@ShigrafS ShigrafS force-pushed the cli branch 3 times, most recently from 57751ef to 10297b9 Compare August 23, 2025 07:15
@ShigrafS
Copy link
Contributor Author

@Legend-Master
Build successfully: Finished dev profile [unoptimized + debuginfo] target(s) in 28m 13s

The other changes are due to linter.
Please let me know how should I proceed with it.
Thanks!

@Legend-Master
Copy link
Contributor

The other changes are due to linter.
Please let me know how should I proceed with it.

You'll need to revert them as well

@ShigrafS ShigrafS force-pushed the cli branch 4 times, most recently from 177d464 to a5febe6 Compare August 23, 2025 10:06
…cess

- 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>
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
@ShigrafS
Copy link
Contributor Author

Thank you for your guidance @Legend-Master
I've made the necessary changes.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 23, 2025

Package Changes Through 332f55f

There are 2 changes which include tauri-cli with minor, tauri-bundler with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri-bundler 2.6.0 2.7.0
@tauri-apps/cli 2.8.1 2.8.2
tauri-cli 2.8.0 2.9.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

Signed-off-by: ShigrafS <shigrafsalik@proton.me>
Copy link
Contributor

@Legend-Master Legend-Master left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll also a change file

https://github.com/tauri-apps/tauri/blob/dev/.changes/README.md

@FabianLars Since I'm not familiar with signing on macOS (I think it would fail if you have signingIdentity set but not the signing env vars), do you think we should also add this for macOS? I know we don't force the signing on Linux and the mobile signing process is not covered by tauri cli so probably don't need it for those platforms

target_platform: TargetPlatform,
/// The target triple.
target: String,
pub no_sign: bool,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub no_sign: bool,
no_sign: bool,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting this back to public, since making this private is breaking the code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be put into a getter below instead of being pub here

Signed-off-by: ShigrafS <shigrafsalik@proton.me>
o_sign flag in build options

Signed-off-by: ShigrafS <shigrafsalik@proton.me>
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
o_sign private and add getter

Signed-off-by: ShigrafS <shigrafsalik@proton.me>
@ShigrafS ShigrafS requested a review from Legend-Master August 24, 2025 07:59
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
@Legend-Master Legend-Master added this to the 2.9 milestone Aug 25, 2025
@ShigrafS
Copy link
Contributor Author

@Legend-Master @lucasfernog
Should I rebase the branch?

@FabianLars
Copy link
Member

nah you're good, github shows no merge conflicts yet. we're just waiting for 2.9 to get a bit closer before we merge it.

@lucasfernog lucasfernog merged commit 2a06d10 into tauri-apps:dev Sep 1, 2025
17 checks passed
@github-project-automation github-project-automation bot moved this from 📬Proposal to 🔎 In audit in Roadmap Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 In audit

Development

Successfully merging this pull request may close these issues.

[feat] build without signing cli flag

4 participants