From c46b7ca51c58e9698b63c3a517f8c67499b5aee0 Mon Sep 17 00:00:00 2001 From: web3-bot <81333946+web3-bot@users.noreply.github.com> Date: Wed, 20 Aug 2025 16:25:30 +0000 Subject: [PATCH 1/3] chore!: bump go.mod to Go 1.24 and run go fix BREAKING CHANGE: Updating the Go version to 1.24 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index b581442..7ed423c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ipfs/ipfs-update -go 1.23 +go 1.24 require ( github.com/blang/semver/v4 v4.0.0 From 52788eaae72bd0a9d693be1df52fddb292100b60 Mon Sep 17 00:00:00 2001 From: Piotr Galar Date: Thu, 21 Aug 2025 09:49:54 +0200 Subject: [PATCH 2/3] chore: update Go in sharness workflow --- .github/workflows/sharness.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sharness.yml b/.github/workflows/sharness.yml index 3aa4801..ffcf3b2 100644 --- a/.github/workflows/sharness.yml +++ b/.github/workflows/sharness.yml @@ -5,7 +5,7 @@ jobs: strategy: fail-fast: false matrix: - go: [ "1.21.x", "1.22.x" ] + go: [ "1.24.x", "1.25.x" ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 5ec50af6fedbff43fe66eac31b4996212ccf44e0 Mon Sep 17 00:00:00 2001 From: galargh Date: Thu, 21 Aug 2025 09:12:29 +0100 Subject: [PATCH 3/3] chore: rename go-ipfs -> kubo --- lib/install.go | 3 +-- main.go | 10 +++++----- sharness/lib/test-lib.sh | 2 +- sharness/t0020-version.sh | 12 ++++++------ sharness/t0030-install.sh | 16 ++++++++-------- sharness/t0040-install-many.sh | 9 +++------ sharness/t0050-revert.sh | 6 +++--- 7 files changed, 27 insertions(+), 31 deletions(-) diff --git a/lib/install.go b/lib/install.go index 4e636ee..a9f30a2 100644 --- a/lib/install.go +++ b/lib/install.go @@ -243,8 +243,7 @@ func (i *Install) downloadNewBinary(ctx context.Context) error { return err } - // TODO: switch to "kubo" distname after 1+ year since rename in 2022 ;-) - distname := "go-ipfs" + distname := "kubo" stump.Log("fetching %s version %s", distname, i.targetVers) i.tmpBinPath, err = migrations.FetchBinary(ctx, i.fetcher, distname, i.targetVers, "ipfs", out) diff --git a/main.go b/main.go index 98452b0..359f294 100644 --- a/main.go +++ b/main.go @@ -91,7 +91,7 @@ var cmdVersions = &cli.Command{ ArgsUsage: " ", Action: func(c *cli.Context) error { fetcher := createFetcher(c) - vs, err := migrations.DistVersions(c.Context, fetcher, "go-ipfs", true) + vs, err := migrations.DistVersions(c.Context, fetcher, "kubo", true) if err != nil { stump.Fatal("failed to query versions:", err) } @@ -142,7 +142,7 @@ var cmdInstall = &cli.Command{ if vers == "latest" || vers == "beta" { stable := vers == "latest" - latest, err := migrations.LatestDistVersion(c.Context, fetcher, "go-ipfs", stable) + latest, err := migrations.LatestDistVersion(c.Context, fetcher, "kubo", stable) if err != nil { stump.Fatal("error resolving %q: %s", vers, err) } @@ -262,7 +262,7 @@ var cmdFetch = &cli.Command{ stump.VLog("looking up 'latest'") stable = true } - latest, err := migrations.LatestDistVersion(c.Context, fetcher, "go-ipfs", stable) + latest, err := migrations.LatestDistVersion(c.Context, fetcher, "kubo", stable) if err != nil { stump.Fatal("error querying %q version: %s", vers, err) } @@ -278,9 +278,9 @@ var cmdFetch = &cli.Command{ output = migrations.ExeName("ipfs-" + vers) } - stump.Log("fetching go-ipfs version", vers) + stump.Log("fetching kubo version", vers) - _, err = migrations.FetchBinary(c.Context, fetcher, "go-ipfs", vers, "ipfs", output) + _, err = migrations.FetchBinary(c.Context, fetcher, "kubo", vers, "ipfs", output) if err != nil { stump.Fatal("failed to fetch binary:", err) } diff --git a/sharness/lib/test-lib.sh b/sharness/lib/test-lib.sh index 54c75f9..482ca47 100644 --- a/sharness/lib/test-lib.sh +++ b/sharness/lib/test-lib.sh @@ -63,7 +63,7 @@ test_install_version() { ' test_expect_success "'ipfs-update install' output looks good" ' - grep "fetching go-ipfs version $VERSION" actual && + grep "fetching kubo version $VERSION" actual && grep "Installation complete." actual || test_fsh cat actual ' diff --git a/sharness/t0020-version.sh b/sharness/t0020-version.sh index 104d383..829d344 100755 --- a/sharness/t0020-version.sh +++ b/sharness/t0020-version.sh @@ -16,9 +16,9 @@ test_expect_success "'ipfs-update versions' works" ' ' test_expect_success "'ipfs-update versions' output looks good" ' - grep v0.3.7 actual && - grep v0.3.8 actual && - grep v0.3.9 actual + grep v0.14.0 actual && + grep v0.14.0-rc1 actual && + grep v0.36.0 actual ' test_expect_success "start a docker container" ' @@ -43,9 +43,9 @@ test_expect_success "'ipfs-update versions' works" ' ' test_expect_success "'ipfs-update versions' output looks good" ' - grep v0.3.7 actual && - grep v0.3.8 actual && - grep v0.3.9 actual + grep v0.14.0 actual && + grep v0.14.0-rc1 actual && + grep v0.36.0 actual ' test_expect_success "stop a docker container" ' diff --git a/sharness/t0030-install.sh b/sharness/t0030-install.sh index 099134b..3ca3527 100755 --- a/sharness/t0030-install.sh +++ b/sharness/t0030-install.sh @@ -11,12 +11,12 @@ test_expect_success "start a docker container" ' ' test_expect_success "'ipfs-update install' works" ' - exec_docker "$DOCID" "$GUEST_IPFS_UPDATE --verbose install v0.3.9" >actual 2>&1 || + exec_docker "$DOCID" "$GUEST_IPFS_UPDATE --verbose install v0.36.0" >actual 2>&1 || test_fsh cat actual ' test_expect_success "'ipfs-update install' output looks good" ' - grep "fetching go-ipfs version v0.3.9" actual + grep "fetching kubo version v0.36.0" actual ' test_expect_success "'ipfs-update version' works" ' @@ -24,27 +24,27 @@ test_expect_success "'ipfs-update version' works" ' ' test_expect_success "'ipfs-update version' output looks good" ' - echo "v0.3.9" >expected && + echo "v0.36.0" >expected && test_cmp expected actual ' test_expect_success "'ipfs-update install' works when something is installed" ' - exec_docker "$DOCID" "$GUEST_IPFS_UPDATE --verbose install v0.4.23" >actual 2>&1 || + exec_docker "$DOCID" "$GUEST_IPFS_UPDATE --verbose install v0.36.0" >actual 2>&1 || test_fsh cat actual ' test_expect_success "'ipfs-update install' fails when downgrading without the downgrade flag" ' - test_must_fail exec_docker "$DOCID" "$GUEST_IPFS_UPDATE --verbose install v0.3.8" >actual 2>&1 || + test_must_fail exec_docker "$DOCID" "$GUEST_IPFS_UPDATE --verbose install v0.14.0" >actual 2>&1 || test_fsh cat actual ' test_expect_success "'ipfs-update install' works when downgrading with flag" ' - exec_docker "$DOCID" "$GUEST_IPFS_UPDATE --verbose install --allow-downgrade v0.3.8" >actual 2>&1 || + exec_docker "$DOCID" "$GUEST_IPFS_UPDATE --verbose install --allow-downgrade v0.14.0" >actual 2>&1 || test_fsh cat actual ' test_expect_success "'ipfs-update install' output looks good" ' - grep "fetching go-ipfs version v0.3.8" actual + grep "fetching kubo version v0.14.0" actual ' test_expect_success "'ipfs-update version' works" ' @@ -52,7 +52,7 @@ test_expect_success "'ipfs-update version' works" ' ' test_expect_success "'ipfs-update version' output looks good" ' - echo "v0.3.8" >expected && + echo "v0.14.0" >expected && test_cmp expected actual ' diff --git a/sharness/t0040-install-many.sh b/sharness/t0040-install-many.sh index d01b93f..e700148 100755 --- a/sharness/t0040-install-many.sh +++ b/sharness/t0040-install-many.sh @@ -10,14 +10,11 @@ test_expect_success "start a docker container" ' DOCID=$(start_docker) ' -test_install_version "v0.3.7" -test_install_version "v0.3.10" +test_install_version "v0.14.0" +test_install_version "v0.36.0" # ensure downgrade works -test_install_version "v0.3.7" - -# test upgrading repos across the v0.12 boundary -test_install_version "v0.11.0" +test_install_version "v0.14.0" # init the repo so that migrations are run test_expect_success "'ipfs init' succeeds" ' diff --git a/sharness/t0050-revert.sh b/sharness/t0050-revert.sh index 3cc9596..e8cae82 100755 --- a/sharness/t0050-revert.sh +++ b/sharness/t0050-revert.sh @@ -10,8 +10,8 @@ test_expect_success "start a docker container" ' DOCID=$(start_docker) ' -test_install_version "v0.3.9" -test_install_version "v0.3.10" +test_install_version "v0.14.0" +test_install_version "v0.36.0" test_expect_success "'ipfs-update revert' works" ' @@ -30,7 +30,7 @@ test_expect_success "'ipfs-update version' works" ' ' test_expect_success "'ipfs-update version' output looks good" ' - echo "v0.3.9" >expected && + echo "v0.14.0" >expected && test_cmp expected actual '