Skip to content

Commit e1d8ae0

Browse files
committed
Deploy preview for PR 685 🛫
1 parent 3be4cb9 commit e1d8ae0

File tree

9 files changed

+30
-46
lines changed

9 files changed

+30
-46
lines changed

pr-preview/pr-685/getting-started/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ <h3 id="homebrew">Homebrew</h3>
169169
<div class="expressive-code"><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="bash"><code><div class="ec-line"><div class="code"><span style="--0:#B392F0">brew</span><span style="--0:#E1E4E8"> </span><span style="--0:#9ECBFF">install</span><span style="--0:#E1E4E8"> </span><span style="--0:#9ECBFF">getsentry/tools/sentry</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="brew install getsentry/tools/sentry"><div></div></button></div></figure></div>
170170
<h3 id="package-managers">Package Managers</h3>
171171
<p>Install globally with your preferred package manager:</p>
172-
<div class="pm-code astro-ehimbizw" data-id="pm-poqrhogwt"> <div class="pm-header astro-ehimbizw"> <div class="pm-tabs astro-ehimbizw"> <button class="pm-tab active astro-ehimbizw" data-pm="npm">npm</button> <button class="pm-tab astro-ehimbizw" data-pm="pnpm">pnpm</button> <button class="pm-tab astro-ehimbizw" data-pm="yarn">yarn</button> <button class="pm-tab astro-ehimbizw" data-pm="bun">bun</button> </div> <button class="pm-copy astro-ehimbizw" aria-label="Copy to clipboard"> <span class="pm-copied astro-ehimbizw">Copied!</span> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="astro-ehimbizw"> <rect width="14" height="14" x="8" y="8" rx="2" ry="2" class="astro-ehimbizw"></rect> <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" class="astro-ehimbizw"></path> </svg> </button> </div> <div class="pm-content astro-ehimbizw"> <pre class="pm-pre astro-ehimbizw" data-pm="npm"><code class="astro-ehimbizw">npm install -g sentry</code></pre> <pre class="pm-pre astro-ehimbizw" data-pm="pnpm" hidden><code class="astro-ehimbizw">pnpm add -g sentry</code></pre> <pre class="pm-pre astro-ehimbizw" data-pm="yarn" hidden><code class="astro-ehimbizw">yarn global add sentry</code></pre> <pre class="pm-pre astro-ehimbizw" data-pm="bun" hidden><code class="astro-ehimbizw">bun add -g sentry</code></pre> </div> </div> <script type="module">document.querySelectorAll(".pm-code").forEach(t=>{const i=t.querySelectorAll(".pm-tab"),a=t.querySelectorAll(".pm-pre"),r=t.querySelector(".pm-copy");i.forEach(c=>{c.addEventListener("click",()=>{const o=c.getAttribute("data-pm");i.forEach(e=>e.classList.remove("active")),c.classList.add("active"),a.forEach(e=>{e.getAttribute("data-pm")===o?e.removeAttribute("hidden"):e.setAttribute("hidden","")})})}),r?.addEventListener("click",async()=>{const o=t.querySelector(".pm-pre:not([hidden])")?.querySelector("code")?.textContent||"";await navigator.clipboard.writeText(o),r.classList.add("copied"),setTimeout(()=>r.classList.remove("copied"),2e3)})});</script>
172+
<div class="pm-code astro-ehimbizw" data-id="pm-ucrobhmli"> <div class="pm-header astro-ehimbizw"> <div class="pm-tabs astro-ehimbizw"> <button class="pm-tab active astro-ehimbizw" data-pm="npm">npm</button> <button class="pm-tab astro-ehimbizw" data-pm="pnpm">pnpm</button> <button class="pm-tab astro-ehimbizw" data-pm="yarn">yarn</button> <button class="pm-tab astro-ehimbizw" data-pm="bun">bun</button> </div> <button class="pm-copy astro-ehimbizw" aria-label="Copy to clipboard"> <span class="pm-copied astro-ehimbizw">Copied!</span> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="astro-ehimbizw"> <rect width="14" height="14" x="8" y="8" rx="2" ry="2" class="astro-ehimbizw"></rect> <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" class="astro-ehimbizw"></path> </svg> </button> </div> <div class="pm-content astro-ehimbizw"> <pre class="pm-pre astro-ehimbizw" data-pm="npm"><code class="astro-ehimbizw">npm install -g sentry</code></pre> <pre class="pm-pre astro-ehimbizw" data-pm="pnpm" hidden><code class="astro-ehimbizw">pnpm add -g sentry</code></pre> <pre class="pm-pre astro-ehimbizw" data-pm="yarn" hidden><code class="astro-ehimbizw">yarn global add sentry</code></pre> <pre class="pm-pre astro-ehimbizw" data-pm="bun" hidden><code class="astro-ehimbizw">bun add -g sentry</code></pre> </div> </div> <script type="module">document.querySelectorAll(".pm-code").forEach(t=>{const i=t.querySelectorAll(".pm-tab"),a=t.querySelectorAll(".pm-pre"),r=t.querySelector(".pm-copy");i.forEach(c=>{c.addEventListener("click",()=>{const o=c.getAttribute("data-pm");i.forEach(e=>e.classList.remove("active")),c.classList.add("active"),a.forEach(e=>{e.getAttribute("data-pm")===o?e.removeAttribute("hidden"):e.setAttribute("hidden","")})})}),r?.addEventListener("click",async()=>{const o=t.querySelector(".pm-pre:not([hidden])")?.querySelector("code")?.textContent||"";await navigator.clipboard.writeText(o),r.classList.add("copied"),setTimeout(()=>r.classList.remove("copied"),2e3)})});</script>
173173
<p>Or run directly without installing:</p>
174-
<div class="pm-code astro-ehimbizw" data-id="pm-0rg11od63"> <div class="pm-header astro-ehimbizw"> <div class="pm-tabs astro-ehimbizw"> <button class="pm-tab active astro-ehimbizw" data-pm="npm">npm</button> <button class="pm-tab astro-ehimbizw" data-pm="pnpm">pnpm</button> <button class="pm-tab astro-ehimbizw" data-pm="yarn">yarn</button> <button class="pm-tab astro-ehimbizw" data-pm="bun">bun</button> </div> <button class="pm-copy astro-ehimbizw" aria-label="Copy to clipboard"> <span class="pm-copied astro-ehimbizw">Copied!</span> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="astro-ehimbizw"> <rect width="14" height="14" x="8" y="8" rx="2" ry="2" class="astro-ehimbizw"></rect> <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" class="astro-ehimbizw"></path> </svg> </button> </div> <div class="pm-content astro-ehimbizw"> <pre class="pm-pre astro-ehimbizw" data-pm="npm"><code class="astro-ehimbizw">npx sentry --help</code></pre> <pre class="pm-pre astro-ehimbizw" data-pm="pnpm" hidden><code class="astro-ehimbizw">pnpm dlx sentry --help</code></pre> <pre class="pm-pre astro-ehimbizw" data-pm="yarn" hidden><code class="astro-ehimbizw">yarn dlx sentry --help</code></pre> <pre class="pm-pre astro-ehimbizw" data-pm="bun" hidden><code class="astro-ehimbizw">bunx sentry --help</code></pre> </div> </div>
174+
<div class="pm-code astro-ehimbizw" data-id="pm-t39k3mw18"> <div class="pm-header astro-ehimbizw"> <div class="pm-tabs astro-ehimbizw"> <button class="pm-tab active astro-ehimbizw" data-pm="npm">npm</button> <button class="pm-tab astro-ehimbizw" data-pm="pnpm">pnpm</button> <button class="pm-tab astro-ehimbizw" data-pm="yarn">yarn</button> <button class="pm-tab astro-ehimbizw" data-pm="bun">bun</button> </div> <button class="pm-copy astro-ehimbizw" aria-label="Copy to clipboard"> <span class="pm-copied astro-ehimbizw">Copied!</span> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="astro-ehimbizw"> <rect width="14" height="14" x="8" y="8" rx="2" ry="2" class="astro-ehimbizw"></rect> <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" class="astro-ehimbizw"></path> </svg> </button> </div> <div class="pm-content astro-ehimbizw"> <pre class="pm-pre astro-ehimbizw" data-pm="npm"><code class="astro-ehimbizw">npx sentry --help</code></pre> <pre class="pm-pre astro-ehimbizw" data-pm="pnpm" hidden><code class="astro-ehimbizw">pnpm dlx sentry --help</code></pre> <pre class="pm-pre astro-ehimbizw" data-pm="yarn" hidden><code class="astro-ehimbizw">yarn dlx sentry --help</code></pre> <pre class="pm-pre astro-ehimbizw" data-pm="bun" hidden><code class="astro-ehimbizw">bunx sentry --help</code></pre> </div> </div>
175175
<h2 id="authentication">Authentication</h2>
176176
<h3 id="oauth-device-flow-recommended">OAuth Device Flow (Recommended)</h3>
177177
<p>The easiest way to authenticate is via OAuth device flow:</p>

pr-preview/pr-685/install

Lines changed: 27 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,19 @@ Usage: install [options]
8383
Options:
8484
-h, --help Display this help message
8585
-v, --version <version> Install a specific version (e.g., 0.2.0) or "nightly"
86-
--init Run \`sentry init\` ephemerally without installing the CLI
8786
--no-modify-path Don't modify shell config files (.zshrc, .bashrc, etc.)
8887
--no-completions Don't install shell completions
8988
9089
Environment Variables:
9190
SENTRY_INSTALL_DIR Override the installation directory
9291
SENTRY_VERSION Install a specific version (e.g., 0.19.0, nightly)
92+
SENTRY_INIT Set to 1 to run \`sentry init\` after installing
9393
9494
Examples:
9595
curl -fsSL https://cli.sentry.dev/install | bash
9696
curl -fsSL https://cli.sentry.dev/install | bash -s -- --version nightly
9797
curl -fsSL https://cli.sentry.dev/install | bash -s -- --version 0.19.0
98-
curl -fsSL https://cli.sentry.dev/install | bash -s -- --init
98+
SENTRY_INIT=1 curl -fsSL https://cli.sentry.dev/install | bash
9999
SENTRY_VERSION=nightly curl -fsSL https://cli.sentry.dev/install | bash
100100
SENTRY_INSTALL_DIR=~/.local/bin curl -fsSL https://cli.sentry.dev/install | bash
101101
EOF
@@ -104,8 +104,6 @@ EOF
104104
requested_version="${SENTRY_VERSION:-}"
105105
no_modify_path=false
106106
no_completions=false
107-
init_mode=false
108-
init_args=()
109107
while [[ $# -gt 0 ]]; do
110108
case "$1" in
111109
-h|--help) usage; exit 0 ;;
@@ -117,13 +115,6 @@ while [[ $# -gt 0 ]]; do
117115
die "Error: --version requires a version argument" "args"
118116
fi
119117
;;
120-
--init)
121-
init_mode=true
122-
shift
123-
# Remaining args are forwarded to `sentry init`
124-
init_args=("$@")
125-
break
126-
;;
127118
--no-modify-path)
128119
no_modify_path=true
129120
shift
@@ -136,12 +127,6 @@ while [[ $# -gt 0 ]]; do
136127
esac
137128
done
138129

139-
# In init mode, skip download if the CLI is already installed.
140-
if [[ "$init_mode" == "true" ]] && command -v sentry >/dev/null 2>&1; then
141-
echo -e "${MUTED}sentry found in PATH, running init directly...${NC}"
142-
exec sentry init ${init_args[@]+"${init_args[@]}"}
143-
fi
144-
145130
# Detect OS
146131
case "$(uname -s)" in
147132
Darwin*) os="darwin" ;;
@@ -270,33 +255,32 @@ fi
270255

271256
chmod +x "$tmp_binary"
272257

273-
if [[ "$init_mode" == "true" ]]; then
274-
# Ephemeral mode: run the wizard and clean up. The EXIT trap (set earlier)
275-
# removes the temp binary. The binary inherits the terminal's stdin (the
276-
# pipe is already consumed by bash), so interactive prompts work normally.
277-
"$tmp_binary" init ${init_args[@]+"${init_args[@]}"}
258+
# Delegate installation and configuration to the binary itself.
259+
# setup --install handles: directory selection, binary placement, PATH,
260+
# completions, agent skills, and the welcome message.
261+
# --channel persists the release channel so future `sentry cli upgrade`
262+
# calls track the same channel without requiring a flag.
263+
if [[ "$requested_version" == "nightly" ]]; then
264+
channel="nightly"
278265
else
279-
# Delegate installation and configuration to the binary itself.
280-
# setup --install handles: directory selection, binary placement, PATH,
281-
# completions, agent skills, and the welcome message.
282-
# --channel persists the release channel so future `sentry cli upgrade`
283-
# calls track the same channel without requiring a flag.
284-
if [[ "$requested_version" == "nightly" ]]; then
285-
channel="nightly"
286-
else
287-
channel="stable"
288-
fi
289-
setup_args="--install --method curl --channel $channel"
290-
if [[ "$no_modify_path" == "true" ]]; then
291-
setup_args="$setup_args --no-modify-path"
292-
fi
293-
if [[ "$no_completions" == "true" ]]; then
294-
setup_args="$setup_args --no-completions"
295-
fi
266+
channel="stable"
267+
fi
268+
setup_args="--install --method curl --channel $channel"
269+
if [[ "$no_modify_path" == "true" ]]; then
270+
setup_args="$setup_args --no-modify-path"
271+
fi
272+
if [[ "$no_completions" == "true" ]]; then
273+
setup_args="$setup_args --no-completions"
274+
fi
275+
276+
# Remove trap — setup will handle temp cleanup on success
277+
trap - EXIT
296278

297-
# Remove trap — setup will handle temp cleanup on success
298-
trap - EXIT
279+
# shellcheck disable=SC2086
280+
"$tmp_binary" cli setup $setup_args
299281

300-
# shellcheck disable=SC2086
301-
"$tmp_binary" cli setup $setup_args
282+
# Optionally launch the setup wizard after install.
283+
# </dev/tty reopens stdin from the terminal since `curl | bash` consumes it.
284+
if [[ "${SENTRY_INIT:-}" == "1" ]]; then
285+
sentry init </dev/tty
302286
fi
8.11 KB
Binary file not shown.
-33.4 KB
Binary file not shown.
-8.1 KB
Binary file not shown.
33.5 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"1.4.0","languages":{"en":{"hash":"en_1db4ad865d","wasm":"en","page_count":28}},"include_characters":["_","","","","","","","","","_"]}
1+
{"version":"1.4.0","languages":{"en":{"hash":"en_bde0603a3d","wasm":"en","page_count":28}},"include_characters":["_","","","","","","","","","_"]}
-322 Bytes
Binary file not shown.
321 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)