From 36456913a27ca381e1f860be80cd5b8c32b030e3 Mon Sep 17 00:00:00 2001
From: stretch <78528552+stretch07@users.noreply.github.com>
Date: Fri, 24 May 2024 10:28:10 -0700
Subject: [PATCH 1/5] add environment-variables
---
.../docs/reference/environment-variables.mdx | 88 +++++++++++++++++--
1 file changed, 81 insertions(+), 7 deletions(-)
diff --git a/src/content/docs/reference/environment-variables.mdx b/src/content/docs/reference/environment-variables.mdx
index d77b1ee947..27a0f54408 100644
--- a/src/content/docs/reference/environment-variables.mdx
+++ b/src/content/docs/reference/environment-variables.mdx
@@ -2,15 +2,89 @@
title: Environment Variables
sidebar:
order: 1
- badge:
- text: WIP
- variant: caution
---
-import Stub from '@components/Stub.astro';
+This is a documentation of all environment variables used by tauri core crates and tauri CLI.
-
+## Tauri CLI
-Integrate https://github.com/tauri-apps/tauri/blob/dev/tooling/cli/ENVIRONMENT_VARIABLES.md into this page.
+These environment variables are inputs to the CLI which may have an equivalent CLI flag.
-
+:::tip[Environment Variable Priority]
+
+If both environment variable and CLI flag are used, the CLI flag will have priority.
+
+:::
+
+### CI
+If set, the CLI will run in CI mode and won't require any user interaction.
+### TAURI_CLI_CONFIG_DEPTH
+Number of levels to traverse and find tauri configuration file.
+### TAURI_CLI_PORT
+Port to use for the CLI built-in dev server.
+### TAURI_CLI_WATCHER_IGNORE_FILENAME
+Name of a `.gitignore`-style file to control which files should be watched by the CLI in `dev` command. The CLI will look for this file name in each directory.
+### TAURI_CLI_NO_DEV_SERVER_WAIT
+Skip waiting for the frontend dev server to start before building the tauri application.
+### TAURI_LINUX_AYATANA_APPINDICATOR
+Set this var to `true` or `1` to force usage of `libayatana-appindicator` for system tray on Linux.
+### TAURI_BUNDLER_WIX_FIPS_COMPLIANT
+Specify the bundler's WiX `FipsCompliant` option.
+### TAURI_SKIP_SIDECAR_SIGNATURE_CHECK
+Skip signing sidecars.
+### TAURI_SIGNING_PRIVATE_KEY
+Private key used to sign your app bundles, can be either a string or a path to the file.
+### TAURI_SIGNING_PRIVATE_KEY_PASSWORD
+The signing private key password, see `TAURI_SIGNING_PRIVATE_KEY`.
+### TAURI_SIGNING_RPM_KEY
+The private GPG key used to sign the RPM bundle, exported to its ASCII-armored format.
+### TAURI_SIGNING_RPM_KEY_PASSPHRASE
+The GPG key passphrase for `TAURI_SIGNING_RPM_KEY`, if needed.
+### APPLE_CERTIFICATE
+Base64 encoded of the `.p12` certificate for code signing. To get this value, run `openssl base64 -in MyCertificate.p12 -out MyCertificate-base64.txt`.
+### APPLE_CERTIFICATE_PASSWORD
+The password you used to export the certificate.
+### APPLE_ID
+The Apple ID used to notarize the application. If this environment variable is provided, `APPLE_PASSWORD` and `APPLE_TEAM_ID` must also be set. Alternatively, `APPLE_API_KEY` and `APPLE_API_ISSUER` can be used to authenticate.
+### APPLE_PASSWORD
+The Apple password used to authenticate for application notarization. Required if `APPLE_ID` is specified. An app-specific password can be used. Alternatively to entering the password in plaintext, it may also be specified using a '@keychain:' or '@env:' prefix followed by a keychain password item name or environment variable name.
+### APPLE_TEAM_ID
+Developer team ID. To find your Team ID, go to the [Account](https://developer.apple.com/account) page on the Apple Developer website, and check your membership details.
+### APPLE_API_KEY
+Alternative to `APPLE_ID` and `APPLE_PASSWORD` for notarization authentication using JWT.
+See [creating API keys](https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api) for more information.
+### API_PRIVATE_KEYS_DIR
+Specify the directory where your AuthKey file is located. See `APPLE_API_KEY`.
+### APPLE_API_ISSUER
+Issuer ID. Required if `APPLE_API_KEY` is specified.
+### APPLE_API_KEY_PATH
+Path to the API key `.p8` file. If not specified, the bundler searches the following directories in sequence for a private key file with the name of 'AuthKey\_.p8': './private_keys', '~/private_keys', '~/.private_keys', and '~/.appstoreconnect/private_keys'.
+### APPLE_SIGNING_IDENTITY
+The identity used to code sign. Overwrites `tauri.conf.json > bundle > macOS > signingIdentity`.
+### APPLE_PROVIDER_SHORT_NAME
+If your Apple ID is connected to multiple teams, you have to specify the provider short name of the team you want to use to notarize your app. Overwrites `tauri.conf.json > bundle > macOS > providerShortName`.
+### APPLE_DEVELOPMENT_TEAM
+TODO
+### TAURI_WEBVIEW_AUTOMATION
+Enables webview automation (Linux Only).
+### TAURI_ANDROID_PROJECT_PATH
+Path of the tauri android project, usually will be `/src-tauri/gen/android`.
+### TAURI_IOS_PROJECT_PATH
+Path of the tauri iOS project, usually will be `/src-tauri/gen/ios`.
+
+## Tauri CLI Hook Commands
+
+These environment variables are set for each hook command (`beforeDevCommand`, `beforeBuildCommand`, ...etc) which could be useful to conditionally build your frontend or execute a specific action.
+
+### TAURI_ENV_DEBUG
+`true` for `dev` command or `build --debug`, `false` otherwise.
+### TAURI_ENV_TARGET_TRIPLE
+Target triple the CLI is building.
+### TAURI_ENV_ARCH
+Target arch, `x86_64`, `aarch64`...etc.
+### TAURI_ENV_PLATFORM
+Target platform, `windows`, `darwin`, `linux`...etc.
+### TAURI_ENV_PLATFORM_VERSION
+Build platform version
+### TAURI_ENV_FAMILY
+Target platform family `unix` or `windows`.
From 596964c618494b3d28898a9de7a7ade1380a473a Mon Sep 17 00:00:00 2001
From: stretch <78528552+stretch07@users.noreply.github.com>
Date: Fri, 24 May 2024 10:35:41 -0700
Subject: [PATCH 2/5] update broken strikethrough
---
src/content/docs/reference/environment-variables.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/content/docs/reference/environment-variables.mdx b/src/content/docs/reference/environment-variables.mdx
index 27a0f54408..88e62292ac 100644
--- a/src/content/docs/reference/environment-variables.mdx
+++ b/src/content/docs/reference/environment-variables.mdx
@@ -58,7 +58,7 @@ Specify the directory where your AuthKey file is located. See `APPLE_API_KEY`.
### APPLE_API_ISSUER
Issuer ID. Required if `APPLE_API_KEY` is specified.
### APPLE_API_KEY_PATH
-Path to the API key `.p8` file. If not specified, the bundler searches the following directories in sequence for a private key file with the name of 'AuthKey\_.p8': './private_keys', '~/private_keys', '~/.private_keys', and '~/.appstoreconnect/private_keys'.
+Path to the API key `.p8` file. If not specified, the bundler searches the following directories in sequence for a private key file with the name of 'AuthKey\_.p8': './private_keys', '\~/private_keys', '\~/.private_keys', and '\~/.appstoreconnect/private_keys'.
### APPLE_SIGNING_IDENTITY
The identity used to code sign. Overwrites `tauri.conf.json > bundle > macOS > signingIdentity`.
### APPLE_PROVIDER_SHORT_NAME
From 12b3fc737e3f01e8604dd184a810484f49b9db2f Mon Sep 17 00:00:00 2001
From: vasfvitor
Date: Fri, 24 May 2024 14:48:03 -0300
Subject: [PATCH 3/5] escape <
---
src/content/docs/reference/environment-variables.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/content/docs/reference/environment-variables.mdx b/src/content/docs/reference/environment-variables.mdx
index 88e62292ac..a35a038abc 100644
--- a/src/content/docs/reference/environment-variables.mdx
+++ b/src/content/docs/reference/environment-variables.mdx
@@ -58,7 +58,7 @@ Specify the directory where your AuthKey file is located. See `APPLE_API_KEY`.
### APPLE_API_ISSUER
Issuer ID. Required if `APPLE_API_KEY` is specified.
### APPLE_API_KEY_PATH
-Path to the API key `.p8` file. If not specified, the bundler searches the following directories in sequence for a private key file with the name of 'AuthKey\_.p8': './private_keys', '\~/private_keys', '\~/.private_keys', and '\~/.appstoreconnect/private_keys'.
+Path to the API key `.p8` file. If not specified, the bundler searches the following directories in sequence for a private key file with the name of 'AuthKey\_\.p8': './private_keys', '\~/private_keys', '\~/.private_keys', and '\~/.appstoreconnect/private_keys'.
### APPLE_SIGNING_IDENTITY
The identity used to code sign. Overwrites `tauri.conf.json > bundle > macOS > signingIdentity`.
### APPLE_PROVIDER_SHORT_NAME
From 21a6e15eb128a5ba7bbbc7fae855809b224a3def Mon Sep 17 00:00:00 2001
From: stretch <78528552+stretch07@users.noreply.github.com>
Date: Sat, 25 May 2024 21:12:41 -0700
Subject: [PATCH 4/5] fix: bulleted list instead of headers
---
.../docs/reference/environment-variables.mdx | 101 ++++++------------
1 file changed, 34 insertions(+), 67 deletions(-)
diff --git a/src/content/docs/reference/environment-variables.mdx b/src/content/docs/reference/environment-variables.mdx
index a35a038abc..977d764806 100644
--- a/src/content/docs/reference/environment-variables.mdx
+++ b/src/content/docs/reference/environment-variables.mdx
@@ -16,75 +16,42 @@ If both environment variable and CLI flag are used, the CLI flag will have prior
:::
-### CI
-If set, the CLI will run in CI mode and won't require any user interaction.
-### TAURI_CLI_CONFIG_DEPTH
-Number of levels to traverse and find tauri configuration file.
-### TAURI_CLI_PORT
-Port to use for the CLI built-in dev server.
-### TAURI_CLI_WATCHER_IGNORE_FILENAME
-Name of a `.gitignore`-style file to control which files should be watched by the CLI in `dev` command. The CLI will look for this file name in each directory.
-### TAURI_CLI_NO_DEV_SERVER_WAIT
-Skip waiting for the frontend dev server to start before building the tauri application.
-### TAURI_LINUX_AYATANA_APPINDICATOR
-Set this var to `true` or `1` to force usage of `libayatana-appindicator` for system tray on Linux.
-### TAURI_BUNDLER_WIX_FIPS_COMPLIANT
-Specify the bundler's WiX `FipsCompliant` option.
-### TAURI_SKIP_SIDECAR_SIGNATURE_CHECK
-Skip signing sidecars.
-### TAURI_SIGNING_PRIVATE_KEY
-Private key used to sign your app bundles, can be either a string or a path to the file.
-### TAURI_SIGNING_PRIVATE_KEY_PASSWORD
-The signing private key password, see `TAURI_SIGNING_PRIVATE_KEY`.
-### TAURI_SIGNING_RPM_KEY
-The private GPG key used to sign the RPM bundle, exported to its ASCII-armored format.
-### TAURI_SIGNING_RPM_KEY_PASSPHRASE
-The GPG key passphrase for `TAURI_SIGNING_RPM_KEY`, if needed.
-### APPLE_CERTIFICATE
-Base64 encoded of the `.p12` certificate for code signing. To get this value, run `openssl base64 -in MyCertificate.p12 -out MyCertificate-base64.txt`.
-### APPLE_CERTIFICATE_PASSWORD
-The password you used to export the certificate.
-### APPLE_ID
-The Apple ID used to notarize the application. If this environment variable is provided, `APPLE_PASSWORD` and `APPLE_TEAM_ID` must also be set. Alternatively, `APPLE_API_KEY` and `APPLE_API_ISSUER` can be used to authenticate.
-### APPLE_PASSWORD
-The Apple password used to authenticate for application notarization. Required if `APPLE_ID` is specified. An app-specific password can be used. Alternatively to entering the password in plaintext, it may also be specified using a '@keychain:' or '@env:' prefix followed by a keychain password item name or environment variable name.
-### APPLE_TEAM_ID
-Developer team ID. To find your Team ID, go to the [Account](https://developer.apple.com/account) page on the Apple Developer website, and check your membership details.
-### APPLE_API_KEY
-Alternative to `APPLE_ID` and `APPLE_PASSWORD` for notarization authentication using JWT.
-See [creating API keys](https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api) for more information.
-### API_PRIVATE_KEYS_DIR
-Specify the directory where your AuthKey file is located. See `APPLE_API_KEY`.
-### APPLE_API_ISSUER
-Issuer ID. Required if `APPLE_API_KEY` is specified.
-### APPLE_API_KEY_PATH
-Path to the API key `.p8` file. If not specified, the bundler searches the following directories in sequence for a private key file with the name of 'AuthKey\_\.p8': './private_keys', '\~/private_keys', '\~/.private_keys', and '\~/.appstoreconnect/private_keys'.
-### APPLE_SIGNING_IDENTITY
-The identity used to code sign. Overwrites `tauri.conf.json > bundle > macOS > signingIdentity`.
-### APPLE_PROVIDER_SHORT_NAME
-If your Apple ID is connected to multiple teams, you have to specify the provider short name of the team you want to use to notarize your app. Overwrites `tauri.conf.json > bundle > macOS > providerShortName`.
-### APPLE_DEVELOPMENT_TEAM
-TODO
-### TAURI_WEBVIEW_AUTOMATION
-Enables webview automation (Linux Only).
-### TAURI_ANDROID_PROJECT_PATH
-Path of the tauri android project, usually will be `/src-tauri/gen/android`.
-### TAURI_IOS_PROJECT_PATH
-Path of the tauri iOS project, usually will be `/src-tauri/gen/ios`.
+- `CI` — If set, the CLI will run in CI mode and won't require any user interaction.
+- `TAURI_CLI_CONFIG_DEPTH` — Number of levels to traverse and find tauri configuration file.
+- `TAURI_CLI_PORT` — Port to use for the CLI built-in dev server.
+- `TAURI_CLI_WATCHER_IGNORE_FILENAME` — Name of a `.gitignore`-style file to control which files should be watched by the CLI in `dev` command. The CLI will look for this file name in each directory.
+- `TAURI_CLI_NO_DEV_SERVER_WAIT` — Skip waiting for the frontend dev server to start before building the tauri application.
+- `TAURI_LINUX_AYATANA_APPINDICATOR` — Set this var to `true` or `1` to force usage of `libayatana-appindicator` for system tray on Linux.
+- `TAURI_BUNDLER_WIX_FIPS_COMPLIANT` — Specify the bundler's WiX `FipsCompliant` option.
+- `TAURI_SKIP_SIDECAR_SIGNATURE_CHECK` - Skip signing sidecars.
+- `TAURI_SIGNING_PRIVATE_KEY` — Private key used to sign your app bundles, can be either a string or a path to the file.
+- `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` — The signing private key password, see `TAURI_SIGNING_PRIVATE_KEY`.
+- `TAURI_SIGNING_RPM_KEY` — The private GPG key used to sign the RPM bundle, exported to its ASCII-armored format.
+- `TAURI_SIGNING_RPM_KEY_PASSPHRASE` — The GPG key passphrase for `TAURI_SIGNING_RPM_KEY`, if needed.
+- `APPLE_CERTIFICATE` — Base64 encoded of the `.p12` certificate for code signing. To get this value, run `openssl base64 -in MyCertificate.p12 -out MyCertificate-base64.txt`.
+- `APPLE_CERTIFICATE_PASSWORD` — The password you used to export the certificate.
+- `APPLE_ID` — The Apple ID used to notarize the application. If this environment variable is provided, `APPLE_PASSWORD` and `APPLE_TEAM_ID` must also be set. Alternatively, `APPLE_API_KEY` and `APPLE_API_ISSUER` can be used to authenticate.
+- `APPLE_PASSWORD` — The Apple password used to authenticate for application notarization. Required if `APPLE_ID` is specified. An app-specific password can be used. Alternatively to entering the password in plaintext, it may also be specified using a '@keychain:' or '@env:' prefix followed by a keychain password item name or environment variable name.
+- `APPLE_TEAM_ID`: Developer team ID. To find your Team ID, go to the [Account](https://developer.apple.com/account) page on the Apple Developer website, and check your membership details.
+- `APPLE_API_KEY` — Alternative to `APPLE_ID` and `APPLE_PASSWORD` for notarization authentication using JWT.
+ - See [creating API keys](https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api) for more information.
+- `API_PRIVATE_KEYS_DIR` — Specify the directory where your AuthKey file is located. See `APPLE_API_KEY`.
+- `APPLE_API_ISSUER` — Issuer ID. Required if `APPLE_API_KEY` is specified.
+- `APPLE_API_KEY_PATH` - path to the API key `.p8` file. If not specified, the bundler searches the following directories in sequence for a private key file with the name of 'AuthKey\_.p8': './private_keys', '\~/private_keys', '\~/.private_keys', and '\~/.appstoreconnect/private_keys'.
+- `APPLE_SIGNING_IDENTITY` — The identity used to code sign. Overwrites `tauri.conf.json > bundle > macOS > signingIdentity`.
+- `APPLE_PROVIDER_SHORT_NAME` — If your Apple ID is connected to multiple teams, you have to specify the provider short name of the team you want to use to notarize your app. Overwrites `tauri.conf.json > bundle > macOS > providerShortName`.
+- `APPLE_DEVELOPMENT_TEAM` — TODO
+- `TAURI_WEBVIEW_AUTOMATION` — Enables webview automation (Linux Only).
+- `TAURI_ANDROID_PROJECT_PATH` — Path of the tauri android project, usually will be `/src-tauri/gen/android`.
+- `TAURI_IOS_PROJECT_PATH` — Path of the tauri iOS project, usually will be `/src-tauri/gen/ios`.
## Tauri CLI Hook Commands
These environment variables are set for each hook command (`beforeDevCommand`, `beforeBuildCommand`, ...etc) which could be useful to conditionally build your frontend or execute a specific action.
-### TAURI_ENV_DEBUG
-`true` for `dev` command or `build --debug`, `false` otherwise.
-### TAURI_ENV_TARGET_TRIPLE
-Target triple the CLI is building.
-### TAURI_ENV_ARCH
-Target arch, `x86_64`, `aarch64`...etc.
-### TAURI_ENV_PLATFORM
-Target platform, `windows`, `darwin`, `linux`...etc.
-### TAURI_ENV_PLATFORM_VERSION
-Build platform version
-### TAURI_ENV_FAMILY
-Target platform family `unix` or `windows`.
+- `TAURI_ENV_DEBUG` — `true` for `dev` command or `build --debug`, `false` otherwise.
+- `TAURI_ENV_TARGET_TRIPLE` — Target triple the CLI is building.
+- `TAURI_ENV_ARCH` — Target arch, `x86_64`, `aarch64`...etc.
+- `TAURI_ENV_PLATFORM` — Target platform, `windows`, `darwin`, `linux`...etc.
+- `TAURI_ENV_PLATFORM_VERSION` — Build platform version
+- `TAURI_ENV_FAMILY` — Target platform family `unix` or `windows`.
From 20558351d54d8834f73bd9df1d695e900dd8b45e Mon Sep 17 00:00:00 2001
From: vasfvitor
Date: Sun, 26 May 2024 01:22:20 -0300
Subject: [PATCH 5/5] escape <
---
src/content/docs/reference/environment-variables.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/content/docs/reference/environment-variables.mdx b/src/content/docs/reference/environment-variables.mdx
index 977d764806..16f66f7654 100644
--- a/src/content/docs/reference/environment-variables.mdx
+++ b/src/content/docs/reference/environment-variables.mdx
@@ -37,7 +37,7 @@ If both environment variable and CLI flag are used, the CLI flag will have prior
- See [creating API keys](https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api) for more information.
- `API_PRIVATE_KEYS_DIR` — Specify the directory where your AuthKey file is located. See `APPLE_API_KEY`.
- `APPLE_API_ISSUER` — Issuer ID. Required if `APPLE_API_KEY` is specified.
-- `APPLE_API_KEY_PATH` - path to the API key `.p8` file. If not specified, the bundler searches the following directories in sequence for a private key file with the name of 'AuthKey\_.p8': './private_keys', '\~/private_keys', '\~/.private_keys', and '\~/.appstoreconnect/private_keys'.
+- `APPLE_API_KEY_PATH` - path to the API key `.p8` file. If not specified, the bundler searches the following directories in sequence for a private key file with the name of 'AuthKey\_\.p8': './private_keys', '\~/private_keys', '\~/.private_keys', and '\~/.appstoreconnect/private_keys'.
- `APPLE_SIGNING_IDENTITY` — The identity used to code sign. Overwrites `tauri.conf.json > bundle > macOS > signingIdentity`.
- `APPLE_PROVIDER_SHORT_NAME` — If your Apple ID is connected to multiple teams, you have to specify the provider short name of the team you want to use to notarize your app. Overwrites `tauri.conf.json > bundle > macOS > providerShortName`.
- `APPLE_DEVELOPMENT_TEAM` — TODO