open-code-review icon indicating copy to clipboard operation
open-code-review copied to clipboard

feat(pages): serve install scripts from the custom domain (open-codereview.ai/install.sh)

Open lizhengfeng101 opened this issue 4 months ago • 3 comments

Description

Now that the project has its own domain (https://open-codereview.ai/), we can serve the install scripts directly from it and shorten the install commands.

Today every install command points at the long raw GitHub URL:

# current
curl -fsSL https://raw.githubusercontent.com/alibaba/open-code-review/main/install.sh | sh
irm https://raw.githubusercontent.com/alibaba/open-code-review/main/install.ps1 | iex

With the scripts hosted on the domain, this becomes short and memorable (matching the industry convention of get.docker.com, sh.rustup.rs, etc.):

# desired
curl -fsSL https://open-codereview.ai/install.sh | sh
irm https://open-codereview.ai/install.ps1 | iex

The landing site is a static site deployed to GitHub Pages (.github/workflows/deploy-pages.yml), with the domain configured via pages/public/CNAME (open-codereview.ai). So any file that ends up in the built artifact root is reachable at https://open-codereview.ai/<file>.

Note: the install scripts do not hard-depend on the raw URL for their actual work — downloads go through the GitHub API + releases (install.sh main()); the raw.githubusercontent.com string only appears in the header comments. So hosting them under the domain is purely additive and safe.

Scope

  • Hosting mechanism (pick one, single source of truth preferred):
    • Recommended: in .github/workflows/deploy-pages.yml, extend the Prepare deployment artifact step to also copy install.sh and install.ps1 into _site/ (it already does this for logo.svg). Keeps the scripts at repo root as the single source.
    • Alternative: copy the scripts into pages/public/ (webpack's CopyPlugin copies pages/public/* into dist, see pages/webpack.config.js), at the cost of maintaining duplicate files.
  • Update install commands to the short domain URL:
    • pages/src/components/HeroSection.tsx (the INSTALL_CHANNELS array — note this is also touched by #408)
    • README.md, README.zh-CN.md, README.ja-JP.md, README.ko-KR.md, README.ru-RU.md
    • Docs: pages/src/content/docs/{en,zh,ja}/installation.md, .../integrations/ci.md, .../integrations/claude-code.md, .../integrations/delegate.md
  • Optionally update the header comments inside install.sh / install.ps1 to reference the short URL too.

Acceptance Criteria

  • [ ] install.sh and install.ps1 are included in the deployed Pages artifact and reachable at https://open-codereview.ai/install.sh and https://open-codereview.ai/install.ps1
  • [ ] curl -fsSL https://open-codereview.ai/install.sh | sh installs the CLI successfully
  • [ ] irm https://open-codereview.ai/install.ps1 | iex installs the CLI successfully on Windows
  • [ ] All install commands in README (all 5 locales) and docs (en/zh/ja) use the short domain URL
  • [ ] Code check passes (make check)

Context

Discovered while reviewing #408, which redesigns the Hero section and introduces three install channels still using the long raw URLs. Ideally the URL swap lands together with, or right after, that PR so the new install channels ship with the short domain.

The GitHub Pages 404.html SPA fallback (pages/webpack.config.js) should not interfere, since real files take precedence over the fallback — worth a quick verification that the raw .sh/.ps1 content is served as-is (not the HTML shell) when fetched via curl.

lizhengfeng101 avatar Jul 21 '26 03:07 lizhengfeng101

@lizhengfeng101 Hi, I’d like to work on this issue. I’ll keep the root installation scripts as the single source of truth, include them in the Pages artifact, update the documented installation URLs, and run the project checks.

dubeyharshit0605 avatar Jul 21 '26 05:07 dubeyharshit0605

@lizhengfeng101 Hi, I’d like to work on this issue. I’ll keep the root installation scripts as the single source of truth, include them in the Pages artifact, update the documented installation URLs, and run the project checks.你好,我想参与这个问题的处理。我会保留 root 安装脚本作为唯一的真实来源,把它们包含在 Pages 工件中,更新文档中的安装 URL,并运行项目检查。

@dubeyharshit0605 Looking forward to your PR~

lizhengfeng101 avatar Jul 21 '26 05:07 lizhengfeng101

the issue is still open?

amh1k avatar Jul 31 '26 07:07 amh1k