Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

feat: redirect /install.sh and /install.ps1 to the install scripts - #429

Merged
AbhishekDoshi26 merged 3 commits into
mainfrom
mc/install-script-redirect
Oct 22, 2026
Merged

AbhishekDoshi26 merged 3 commits into
mainfrom
mc/install-script-redirect

Conversation

@easymac

@easymac easymac commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Adds shorebird.dev/install.sh and shorebird.dev/install.ps1 as 302 redirects to the scripts in shorebirdtech/install, so the docs can publish a short install command on our own domain.

The scripts stay in shorebirdtech/install, so a push there still ships without a site deploy. 302 rather than 301 so no client or proxy caches the destination, which leaves room to move the scripts later.

The rules go in astro.config.mjs; the build regenerates firebase.json from them. Build, format check, link check and cspell pass locally.

The docs change that switches every install command to these URLs should merge after this one is deployed: shorebirdtech/docs#753

After deploy, curl -sSI https://shorebird.dev/install.sh should answer 302 with the GitHub location.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🐦 Preview of 4b8d55f: https://shorebird-website--pr-429-cbktjcmx.web.app (expires in 7 days)

@AbhishekDoshi26 AbhishekDoshi26 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review round 1. On the preview, /install.sh, /install.sh/ and /install.ps1 all answer 302 with the right GitHub location, so the redirects work. Findings are inline. I'll push fixes for the stub and caching items.

The root cause of the stub issue sits outside the diff: in src/integrations/firebase.ts (line 24), hostOnly is typed Record<string, string>, so a 302 can't go there. That's why these rules ended up in the Astro redirects map. The rule mapping already handles the {destination, status} form, so widening the type is enough.

Comment thread astro.config.mjs Resolved
Comment thread astro.config.mjs Resolved
Comment thread astro.config.mjs Resolved
Comment thread firebase.json Resolved
Astro wrote meta-refresh stubs for the install redirects, which hand curl
or iwr HTML anywhere Firebase redirects don't run. Widen hostOnly to take
a status so the 302s can live there, and send Cache-Control: no-store so
the destination can change later.
Firebase Hosting doesn't apply headers rules to redirect responses (checked
on the PR preview), so the rule did nothing. Say so in the comment instead.
@AbhishekDoshi26

Copy link
Copy Markdown
Member

Review rounds 1–2, the fixes:

  • 0fbee93: hostOnly now accepts {destination, status}, and the install 302s moved there, so Astro no longer writes meta-refresh HTML stubs at dist/install.{sh,ps1}/.
  • 4b8d55f: Round 2's fresh review found nothing new. On the redeployed preview, though, Firebase didn't add the Cache-Control: no-store rule to the 302 responses, so I removed that rule and corrected the comment.

Checked on the preview: /install.sh and /install.ps1 return 302 to the right raw GitHub URLs, and curl -fsSL …/install.sh gets the bash script. Build, format and lint pass, and firebase.json regenerates with no diff.

Still open, on the docs side: every POSIX command in shorebirdtech/docs#753 needs curl -L.

@AbhishekDoshi26 AbhishekDoshi26 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Three review rounds; the last two fresh reviews came back clean. Approving. Reminder: shorebirdtech/docs#753 needs curl -L on every POSIX command.

@AbhishekDoshi26
AbhishekDoshi26 merged commit 70e5da5 into main Oct 22, 2026
3 checks passed
@AbhishekDoshi26
AbhishekDoshi26 deleted the mc/install-script-redirect branch October 22, 2026 07:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants