Skip to content
This repository was archived by the owner on Apr 10, 2026. It is now read-only.
Merged
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
29 changes: 29 additions & 0 deletions delegate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package main

import (
"fmt"
"os"

"github.com/ipfs/kubo/repo/fsrepo/migrations"
)

// maxLegacyRepoVersion is the last repo version that requires ipfs-update.
// Kubo v0.37+ migrated to repo version 17 and embedded migration tooling,
// making ipfs-update unnecessary.
const maxLegacyRepoVersion = 16

// exitIfBuiltinUpdateAvailable checks the IPFS repo version and exits
// with guidance to use `ipfs update` when Kubo v0.37+ is detected.
func exitIfBuiltinUpdateAvailable() {
repoVer, err := migrations.RepoVersion("")
if err != nil {
return
}
if repoVer <= maxLegacyRepoVersion {
return
}

fmt.Fprintf(os.Stderr, "IPFS repo version %d (> %d) detected, indicating Kubo v0.37 or later.\n", repoVer, maxLegacyRepoVersion)
fmt.Fprintf(os.Stderr, "ipfs-update is no longer needed. Use `ipfs update --help` instead.\n")
os.Exit(1)
}
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Otherwise you can close this window.`, exeName, windowsHelpURL)
}
}

exitIfBuiltinUpdateAvailable()

app := cli.NewApp()
app.Usage = "Update ipfs."
app.Version = CurrentVersionNumber
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "v1.9.0"
"version": "v1.10.0"
}
Loading