Skip to content

Commit 6c9f7fc

Browse files
authored
Merge pull request #129 from ipfs/chore/latest-migration-lib
Update to latest migration lib and ipfs-update. Also, fix fs-repo-migrations to pull from dist.ipfs.io by default
2 parents a4a9851 + 51e34b1 commit 6c9f7fc

File tree

9 files changed

+467
-81
lines changed

9 files changed

+467
-81
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*~
2-
cmd/fs-repo-migrations/fs-repo-migrations
2+
fs-repo-migrations/fs-repo-migrations
33
sharness/bin/fs-repo-migrations
44
sharness/bin/fs-repo-*-to-*
55
sharness/bin/go-sleep

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ os:
88
language: go
99

1010
go:
11-
- 1.14.x
11+
- "1.16.x"
1212

1313
env:
1414
- TEST_VERBOSE=1

fs-repo-migrations/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ module github.com/ipfs/fs-repo-migrations/fs-repo-migrations
33
go 1.15
44

55
require (
6-
github.com/ipfs/go-ipfs v0.7.1-0.20210325200014-5ee8710c5806
6+
github.com/ipfs/go-ipfs v0.8.1-0.20210331232424-4cdb67f37daa
77
github.com/ipfs/go-ipfs-api v0.2.0
88
)

fs-repo-migrations/go.sum

Lines changed: 219 additions & 27 deletions
Large diffs are not rendered by default.

fs-repo-migrations/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func createFetcher(distPath string) migrations.Fetcher {
3030
const userAgent = "fs-repo-migrations"
3131

3232
if distPath == "" {
33-
distPath = migrations.GetDistPathEnv(migrations.CurrentIpfsDist)
33+
distPath = migrations.GetDistPathEnv(migrations.LatestIpfsDist)
3434
}
3535

3636
return migrations.NewMultiFetcher(

sharness/dependencies/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.15
44

55
require (
66
github.com/chriscool/go-sleep v0.0.0-20150606204034-743ab5f1bb48
7-
github.com/ipfs/ipfs-update v1.6.1-0.20210323142304-8a5f9eabe3fa
7+
github.com/ipfs/ipfs-update v1.7.1
88
github.com/ipfs/iptb v1.4.0
99
github.com/ipfs/iptb-plugins v0.2.1
1010
github.com/jbenet/go-random-files v0.0.0-20190219210431-31b3f20ebded

sharness/dependencies/go.sum

Lines changed: 242 additions & 42 deletions
Large diffs are not rendered by default.

sharness/lib/test-lib.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,9 @@ GUEST_TEST_DIR="sharness/$TEST_DIR_BASENAME"
3535

3636
CERTIFS='/etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt'
3737

38-
# TODO: remove this when migrations are availabe one the distributions site
39-
IPFS_DIST_PATH="/ipfs/QmWLyhqWDsWbcWE8vjmHkzGKLGgvHh84cLxM3ceLsojwrx"
40-
4138
# This writes a docker ID on stdout
4239
start_docker() {
43-
docker run --rm -it -d -v "$CERTIFS" -v "$APP_ROOT_DIR:/mnt" -w "/mnt" -e "IPFS_DIST_PATH=$IPFS_DIST_PATH" "$DOCKER_IMG" /bin/bash
40+
docker run --rm -it -d -v "$CERTIFS" -v "$APP_ROOT_DIR:/mnt" -w "/mnt" "$DOCKER_IMG" /bin/bash
4441
}
4542

4643
# This takes a docker ID and a command as arguments

sharness/t0030-simple-migration.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ test_expect_success "fs-repo-migrations binary is here" '
88
test -f "$LOCAL_FS_REPO_MIG"
99
'
1010

11-
# TODO: remove this when migrations are availabe at the distributions site
12-
export IPFS_DIST_PATH="/ipfs/QmWLyhqWDsWbcWE8vjmHkzGKLGgvHh84cLxM3ceLsojwrx"
13-
1411
test_expect_success "'fs-repo-migrations -v' works" '
1512
"$LOCAL_FS_REPO_MIG" -v >actual
1613
'

0 commit comments

Comments
 (0)