Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/sharness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions lib/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion sharness/lib/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
'
Expand Down
12 changes: 6 additions & 6 deletions sharness/t0020-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" '
Expand All @@ -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" '
Expand Down
16 changes: 8 additions & 8 deletions sharness/t0030-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,48 +11,48 @@ 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" '
exec_docker "$DOCID" "$GUEST_IPFS_UPDATE version" >actual
'

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" '
exec_docker "$DOCID" "$GUEST_IPFS_UPDATE version" >actual
'

test_expect_success "'ipfs-update version' output looks good" '
echo "v0.3.8" >expected &&
echo "v0.14.0" >expected &&
test_cmp expected actual
'

Expand Down
9 changes: 3 additions & 6 deletions sharness/t0040-install-many.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" '
Expand Down
6 changes: 3 additions & 3 deletions sharness/t0050-revert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" '
Expand All @@ -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
'

Expand Down
Loading