Commit Graph

5 Commits

Author SHA1 Message Date
hold-baby b0f5dae7de Switch terminal install scripts to assets.lbkrs.com CDN (#1101)
## Merge Verdict
**[APPROVE]** — Mechanical URL swap from `open.longbridge.com` to
`assets.lbkrs.com` for terminal release lookup + download.
> 2 files · +4 / -4 · `docs/public/longbridge-terminal/`

---
## Summary
- `install` (POSIX) and `install.ps1` (PowerShell) both switched from
`https://open.longbridge.com/...` to
`https://assets.lbkrs.com/github/release/longbridge-terminal/...` for
the latest-version probe and the binary tarball/zip download.
- Path layout also realigned: previously `/{repo}/releases/latest` with
`repo=longbridge/longbridge-terminal`; now
`/github/release/longbridge-terminal/latest` — a fixed path no longer
parameterized by `$repo`.
- `$repo` variable is still declared in `install` but no longer used for
URL construction (only referenced in code comments / future use); kept
to minimize diff.

---
## Risk Analysis
| Risk | Level | Mitigation |
|------|-------|-----------|
| `assets.lbkrs.com/github/release/longbridge-terminal/latest` endpoint
not yet live | 🟡 | Reviewer to confirm the new CDN endpoint is published
before merging — script will fail at `get_latest_release` if the URL
404s |
| Existing users who already ran the old script | ✅ | They have
`longbridge` on PATH; this PR only affects new installs / reinstalls |
| Region build interaction | ✅ | The CN region rewrite plugin (added in
#1100) only rewrites `open.longbridge.com` / `openapi.longbridge.com`;
`assets.lbkrs.com` is intentionally untouched and CN builds will keep
the same CDN URL |
| `$repo` variable now unused | 🟢 | Cosmetic only — script still runs;
removing it is a follow-up cleanup if desired |

---
## Design Decisions
- **Use a fixed path instead of `$repo`-templated**: The new endpoint is
a dedicated CDN slot (`/github/release/longbridge-terminal/`) rather
than a GitHub-mirror-style route, so the `$repo` indirection is no
longer meaningful. Switching to a flat path matches the actual CDN
layout.
- **Source file stays `assets.lbkrs.com` for all regions**: Unlike
`open.longbridge.com`, the assets CDN is not region-split, so no region
rewrite is needed; the file is identical for global and CN builds.

---
## Code Notes
1. **[Needs review]** Endpoint readiness on
`assets.lbkrs.com/github/release/longbridge-terminal/latest`
Reviewer should verify the CDN endpoint serves the latest version tag
(and the per-version tarballs/zips) before merging; otherwise new
installations will fail at the first `curl --silent` call.
2. **[Info]** `$repo='longbridge/longbridge-terminal'` left declared but
unused in `install` (line 5)
Not a bug — script still runs cleanly. Can be removed in a follow-up if
the team prefers a tighter diff for future edits.
— Author note: intentionally kept for now; will clean up in a follow-up.

---
## Verification
- ✅ Both files contain only the URL constants — no logic changes, no
shell-substitution edge cases introduced.
- 📋 Manual check after merge: `curl -sSL
https://assets.lbkrs.com/github/release/longbridge-terminal/install |
sh` on Linux/macOS, and `iwr
https://assets.lbkrs.com/longbridge/longbridge-terminal/install.ps1 |
iex` on Windows.
- 📋 Confirm the CDN endpoint
`assets.lbkrs.com/github/release/longbridge-terminal/latest` returns a
version string with deploy ops.

Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-06-18 12:38:32 +08:00
hold-baby 406b5fb595 修复 terminal 安装脚本版本查询域名 (#1097)
## 合入判断
**[APPROVE]** — 单行域名对齐修复,无显著风险
> 1 file · +1 / -1 · `docs/public/longbridge-terminal`

---
## 变更概要
- 将 `install` 脚本中 `get_latest_release` 拉取最新版本所用的域名由 `open.longbridge.cn`
改为 `open.longbridge.com`
- 修复后与同目录 `install.ps1`(Windows 安装脚本)以及本脚本下方的 `download_url` 域名完全一致

---
## 风险分析
| 风险点 | 等级 | 缓解措施 |
|--------|------|---------|
| 旧域名是否仍可用 | ✅ | 不影响:脚本已统一指向 `.com`,与下载 URL 一致 |
| 用户已缓存旧 install 脚本 | 🟢 | 用户每次通过 `curl ... \| sh` 重新拉取,无持久缓存 |

---
## 设计决策
- **域名统一**:脚本内 `get_latest_release` 与 `download_url` 统一为
`open.longbridge.com`,与 PowerShell 版本保持一致

---
## 代码关注点
无显著问题。

---
## 验证状态
📋 需验证:在 macOS/Linux 上执行 `curl -fsSL
https://open.longbridge.com/longbridge/longbridge-terminal/install | sh`
能成功拉取到最新版本号并完成下载

Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-06-17 23:03:12 +08:00
Jason Lee 718abf3d76 docs(cli): add v0.17.0 commands and release notes (#896)
## Summary

- **`auth` subcommand group** (`longbridge/longbridge-terminal#109`):
updated `install.md` in all 3 locales — `login`/`logout` → `auth
login`/`auth logout`, added `auth status` section
- **`alert enable/disable`** (`longbridge/longbridge-terminal#108`):
updated `alert.md` in all 3 locales with enable/disable subcommand
examples
- Added **v0.17.0** entry to `release-notes.md` and `changelog.md` in
all 3 locales

## Test plan

- [ ] Install page shows `auth login` / `auth logout` / `auth status`
correctly
- [ ] Alert page shows `enable` / `disable` examples
- [ ] Release notes and changelog show v0.17.0 at the top

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 09:56:42 +08:00
hold-baby 267a813a7d feat(region): add China region build with page whitelist, URL rewriti… (#405)
…ng and independent deployment

Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-04-03 21:33:12 +08:00
Jason Lee 9467cdfde5 Fix assets (#370) 2026-03-18 15:00:54 +08:00