Skip to content

Commit 010f06b

Browse files
authored
docs(cli): document TAURI_SIGNING_PRIVATE_KEY_PATH and clarify key vars (#15737)
* docs(cli): document TAURI_SIGNING_PRIVATE_KEY_PATH and clarify key vars * docs(cli): sync signer generate output with signing env var docs and add change file
1 parent 78eaeaf commit 010f06b

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

‎.changes/signing-env-vars.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"tauri-cli": patch:enhance
3+
"@tauri-apps/cli": patch:enhance
4+
---
5+
6+
Document the `TAURI_SIGNING_PRIVATE_KEY_PATH` environment variable and clarify that `TAURI_SIGNING_PRIVATE_KEY` accepts a string or a path for the `build` and `bundle` command but must be the literal key string for the `signer sign` command, both in `ENVIRONMENT_VARIABLES.md` and in the `signer generate` command output.

‎crates/tauri-cli/ENVIRONMENT_VARIABLES.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ These environment variables are inputs to the CLI which may have an equivalent C
1919
- `TAURI_BUNDLER_TOOLS_GITHUB_MIRROR_TEMPLATE` - Specify a GitHub mirror template to download files and tools used by tauri bundler, for example: `https://mirror.example.com/<owner>/<repo>/releases/download/<version>/<asset>`.
2020
- `TAURI_BUNDLER_DMG_IGNORE_CI` - Disable the check for `CI: true` in the `.dmg` bundler.
2121
- `TAURI_SKIP_SIDECAR_SIGNATURE_CHECK` - Skip signing sidecars.
22-
- `TAURI_SIGNING_PRIVATE_KEY` — Private key used to sign your app bundles, can be either a string or a path to the file.
22+
- `TAURI_SIGNING_PRIVATE_KEY` — Private key used to sign your app bundles. For the `build` and `bundle` command, can be either a string or a path to the file. For the `signer sign` command, this must be the literal key string.
23+
- `TAURI_SIGNING_PRIVATE_KEY_PATH` — Path to the private key file for the `signer sign` command. Mutually exclusive with `TAURI_SIGNING_PRIVATE_KEY` when using the signer command.
2324
- `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` — The signing private key password, see `TAURI_SIGNING_PRIVATE_KEY`.
2425
- `TAURI_SIGNING_RPM_KEY` — The private GPG key used to sign the RPM bundle, exported to its ASCII-armored format.
2526
- `TAURI_SIGNING_RPM_KEY_PASSPHRASE` — The GPG key passphrase for `TAURI_SIGNING_RPM_KEY`, if needed.

‎crates/tauri-cli/src/signer/generate.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ pub fn command(mut options: Options) -> Result<()> {
5757

5858
println!();
5959
println!("Environment variables used to sign:");
60-
println!("- `TAURI_SIGNING_PRIVATE_KEY`: String of your private key");
61-
println!("- `TAURI_SIGNING_PRIVATE_KEY_PATH`: Path to your private key file");
60+
println!("- `TAURI_SIGNING_PRIVATE_KEY`: Your private key. For the `build` and `bundle` command it can be either a string or a path to the file, for the `signer sign` command it must be the literal key string");
61+
println!("- `TAURI_SIGNING_PRIVATE_KEY_PATH`: Path to your private key file, used by the `signer sign` command");
6262
println!("- `TAURI_SIGNING_PRIVATE_KEY_PASSWORD`: Your private key password (optional if key has no password)");
6363
println!();
6464
println!("ATTENTION: If you lose your private key OR password, you'll not be able to sign your update package and updates will not work");

0 commit comments

Comments
 (0)