-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
212 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Create a mocked Vercel auth file | ||
read -r -d '' AUTH <<- EOF | ||
{ | ||
"// Note": "This is your Vercel credentials file. DO NOT SHARE!", | ||
"// Docs": "https://vercel.com/docs/project-configuration#global-configuration/auth-json", | ||
"token": "mock-token" | ||
} | ||
EOF | ||
|
||
TMP_DIR=$(mktemp -d -t turbo-XXXXXXXXXX) | ||
|
||
# duplicate over to XDG var so that turbo picks it up | ||
export XDG_CONFIG_HOME=$TMP_DIR | ||
export HOME=$TMP_DIR | ||
export TURBO_CONFIG_DIR_PATH=$TMP_DIR | ||
export TURBO_TELEMETRY_MESSAGE_DISABLED=1 | ||
|
||
# For Linux | ||
mkdir -p "$TMP_DIR/com.vercel.cli" | ||
export VERCEL_CONFIG_DIR_PATH="$TMP_DIR" | ||
echo $AUTH > "$TMP_DIR/com.vercel.cli/auth.json" | ||
|
||
# For macOS | ||
MACOS_DIR="$TMP_DIR/Library/Application Support" | ||
mkdir -p "$MACOS_DIR/com.vercel.cli" | ||
export VERCEL_CONFIG_DIR_PATH="$MACOS_DIR" | ||
echo "$AUTH" > "$MACOS_DIR/com.vercel.cli/auth.json" | ||
|
||
# For Windows | ||
WINDOWS_DIR="$TMP_DIR\\AppData\\Roaming" | ||
mkdir -p "$WINDOWS_DIR\\com.vercel.cli" | ||
export VERCEL_CONFIG_DIR_PATH="$WINDOWS_DIR" | ||
echo "$AUTH" > "$WINDOWS_DIR\\com.vercel.cli\\auth.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters