mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
adds `ipfs update` command tree that downloads pre-built Kubo binaries from GitHub Releases, verifies SHA-512 checksums, and replaces the running binary in place. subcommands: - `ipfs update check` -- query GitHub for newer versions - `ipfs update versions` -- list available releases - `ipfs update install [version]` -- download, verify, backup, and atomically replace the current binary - `ipfs update revert` -- restore the previously backed up binary from `$IPFS_PATH/old-bin/` read-only subcommands (check, versions) work while the daemon is running. install and revert require the daemon to be stopped first. design decisions: - uses GitHub Releases API instead of dist.ipfs.tech because GitHub is harder to censor in regions that block IPFS infrastructure - honors GITHUB_TOKEN/GH_TOKEN to avoid unauthenticated rate limits - backs up the current binary before replacing, with permission-error fallback that saves to a temp dir with manual `sudo mv` instructions - `KUBO_UPDATE_GITHUB_URL` env var redirects API calls for integration testing; `IPFS_VERSION_FAKE` overrides the reported version - unit tests use mock HTTP servers and the var override; CLI tests use the env vars with a temp binary copy so the real build is never touched resolves https://github.com/ipfs/kubo/issues/10937 |
||
|---|---|---|
| .. | ||
| 3nodetest | ||
| api-startup | ||
| bench | ||
| bin | ||
| cli | ||
| dependencies | ||
| integration | ||
| sharness | ||
| unit | ||
| .gitignore | ||
| ipfs-test-lib.sh | ||
| README.md | ||
| Rules.mk | ||
| sharness_test_coverage_helper.sh | ||
Sharness test command coverage
| Module | Online Test | Offline Test |
|---|---|---|
| object | t0051 | t0051 |
| ls | t0045 | t0045 |
| cat | t0040 | |
| dht | ||
| bitswap | ||
| block | t0050 | |
| daemon | t0030 | N/A |
| init | N/A | t0020 |
| add | t0040 | |
| config | t0021 | t0021 |
| version | t0060 | t0010 |
| ping | ||
| diag | ||
| mount | t0030 | |
| name | t0110 | t0100 |
| pin | t0080 | |
| get | t0090 | t0090 |
| refs | t0080 | |
| repo gc | t0080 | |
| id | ||
| bootstrap | t0120 | t0120 |
| swarm | ||
| update | ||
| commands |