Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ ti --version

The installer writes `ti` and `ti-drive9` to `~/.ti/bin` without sudo. Add the `export PATH=...` line to your shell profile to make it persistent.

The macOS/Linux installer downloads both binaries and their checksum files from CDN-fronted sources and verifies the checksums before installation.
The shell and PowerShell installers download `ti` from GitHub Releases and `ti-drive9` from the [`drive9-fe` GitHub repository](https://github.com/mem9-ai/drive9-fe/tree/main/site/releases). Both installers and `ti update` verify the companion against `checksums.txt` from the same GitHub directory before installation.

Windows users:

Expand Down
2 changes: 1 addition & 1 deletion docs/priciples.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ GitHub Releases and GoReleaser produce release archives and checksums. Supported

- Installation and update do not require sudo.
- Installers do not edit shell profiles automatically; they print the command that prepends `~/.ti/bin` to `PATH`.
- Installers support ti release version pinning and checksum verification. The shell installer downloads the companion and its checksums from Drive9's CloudFront-fronted release endpoint (`releases.drive9.ai/latest`); the PowerShell installer and updater use Drive9's origin release endpoint. These companion sources are unversioned; ti does not yet negotiate a companion version range.
- Installers support ti release version pinning and checksum verification. The shell installer, PowerShell installer, and updater download the companion and `checksums.txt` from `mem9-ai/drive9-fe` on GitHub (`main/site/releases`, served by `raw.githubusercontent.com`). This companion source is unversioned; ti does not yet negotiate a companion version range.
- `ti update --check` checks explicitly; there is no background update.
- `ti update` is itself explicit consent and does not require `--yes`.
- The updater stages and verifies ti and its companion before replacement.
Expand Down
4 changes: 2 additions & 2 deletions e2e/installer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ done
case "$url" in
*/ti_checksums.txt) source=%q ;;
*/%s) source=%q ;;
https://releases.drive9.ai/latest/SHA256SUMS) source=%q ;;
https://releases.drive9.ai/latest/%s) source=%q ;;
https://raw.githubusercontent.com/mem9-ai/drive9-fe/main/site/releases/checksums.txt) source=%q ;;
https://raw.githubusercontent.com/mem9-ai/drive9-fe/main/site/releases/%s) source=%q ;;
*) printf 'unexpected URL: %%s\n' "$url" >&2; exit 1 ;;
esac
if [ -n "$out" ]; then
Expand Down
2 changes: 1 addition & 1 deletion internal/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
const (
DefaultReleaseAPIBaseURL = "https://api.github.com/repos/tidbcloud/ti-cli"
checksumAssetName = "ti_checksums.txt"
drive9ReleaseBaseURL = "https://drive9.ai/releases"
drive9ReleaseBaseURL = "https://raw.githubusercontent.com/mem9-ai/drive9-fe/main/site/releases"
drive9ChecksumAssetName = "checksums.txt"
)

Expand Down
5 changes: 3 additions & 2 deletions scripts/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ $ArchiveUrl = "$ReleaseBase/$Artifact"
$ChecksumsUrl = "$ReleaseBase/ti_checksums.txt"
$Target = Join-Path $InstallDir "ti.exe"
$CompanionArtifact = "drive9-windows-amd64.exe"
$CompanionUrl = "https://drive9.ai/releases/$CompanionArtifact"
$CompanionChecksumsUrl = "https://drive9.ai/releases/checksums.txt"
$CompanionBase = "https://raw.githubusercontent.com/mem9-ai/drive9-fe/main/site/releases"
$CompanionUrl = "$CompanionBase/$CompanionArtifact"
$CompanionChecksumsUrl = "$CompanionBase/checksums.txt"
$CompanionTarget = Join-Path $InstallDir "ti-drive9.exe"

if ($DryRun) {
Expand Down
4 changes: 2 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ ARCHIVE_URL="${RELEASE_BASE}/${ARTIFACT}"
CHECKSUMS_URL="${RELEASE_BASE}/ti_checksums.txt"
TARGET="${INSTALL_DIR}/ti"
COMPANION_ARTIFACT="drive9-${OS}-${ARCH}"
COMPANION_BASE="https://releases.drive9.ai/latest"
COMPANION_BASE="https://raw.githubusercontent.com/mem9-ai/drive9-fe/main/site/releases"
COMPANION_URL="${COMPANION_BASE}/${COMPANION_ARTIFACT}"
COMPANION_CHECKSUMS_URL="${COMPANION_BASE}/SHA256SUMS"
COMPANION_CHECKSUMS_URL="${COMPANION_BASE}/checksums.txt"
COMPANION_TARGET="${INSTALL_DIR}/ti-drive9"

if [ "$DRY_RUN" -eq 1 ]; then
Expand Down
Loading