Repository navigation
feat: redirect /install.sh and /install.ps1 to the install scripts - #429
Conversation
|
🐦 Preview of 4b8d55f: https://shorebird-website--pr-429-cbktjcmx.web.app (expires in 7 days) |
AbhishekDoshi26
left a comment
There was a problem hiding this comment.
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.
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.
|
Review rounds 1–2, the fixes:
Checked on the preview: Still open, on the docs side: every POSIX command in shorebirdtech/docs#753 needs |
AbhishekDoshi26
left a comment
There was a problem hiding this comment.
Three review rounds; the last two fresh reviews came back clean. Approving. Reminder: shorebirdtech/docs#753 needs curl -L on every POSIX command.
Adds
shorebird.dev/install.shandshorebird.dev/install.ps1as 302 redirects to the scripts inshorebirdtech/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 regeneratesfirebase.jsonfrom 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.shshould answer302with the GitHublocation.