提交 4add5b8a 作者: Jeromy Johnson 提交者: GitHub

Merge pull request #3631 from ipfs/lgierth-patch-1

migrations: update dist.ipfs.io path
...@@ -15,7 +15,7 @@ import ( ...@@ -15,7 +15,7 @@ import (
"strings" "strings"
) )
var DistPath = "https://ipfs.io/ipfs/QmUnvqDuRyfe7HJuiMMHv77AMUFnjGyAU28LFPeTYwGmFF" var DistPath = "https://ipfs.io/ipfs/QmUgY7wRGB7bEKREE5BNrSwjzrRZddkRV4bu64bP2qgv7f"
func init() { func init() {
if dist := os.Getenv("IPFS_DIST_PATH"); dist != "" { if dist := os.Getenv("IPFS_DIST_PATH"); dist != "" {
...@@ -35,9 +35,6 @@ func migrationsBinName() string { ...@@ -35,9 +35,6 @@ func migrationsBinName() string {
} }
func RunMigration(newv int) error { func RunMigration(newv int) error {
if newv == 5 {
return fmt.Errorf("No automatic migrations yet for repo version 5. You will have to build them from source.\nSee https://github.com/ipfs/fs-repo-migrations")
}
migrateBin := migrationsBinName() migrateBin := migrationsBinName()
fmt.Println(" => Looking for suitable fs-repo-migrations binary.") fmt.Println(" => Looking for suitable fs-repo-migrations binary.")
......
...@@ -13,7 +13,7 @@ test_init_ipfs ...@@ -13,7 +13,7 @@ test_init_ipfs
test_expect_success "setup mock migrations" ' test_expect_success "setup mock migrations" '
mkdir bin && mkdir bin &&
echo "#!/bin/bash" > bin/fs-repo-migrations && echo "#!/bin/bash" > bin/fs-repo-migrations &&
echo "echo 4" >> bin/fs-repo-migrations && echo "echo 5" >> bin/fs-repo-migrations &&
chmod +x bin/fs-repo-migrations && chmod +x bin/fs-repo-migrations &&
export PATH="$(pwd)/bin":$PATH export PATH="$(pwd)/bin":$PATH
' '
...@@ -35,9 +35,8 @@ test_expect_success "ipfs daemon --migrate=true runs migration" ' ...@@ -35,9 +35,8 @@ test_expect_success "ipfs daemon --migrate=true runs migration" '
' '
test_expect_success "output looks good" ' test_expect_success "output looks good" '
#grep "Running: " true_out > /dev/null && grep "Running: " true_out > /dev/null &&
#grep "Success: fs-repo has been migrated to version 4." true_out > /dev/null grep "Success: fs-repo has been migrated to version 5." true_out > /dev/null
grep "No automatic migrations yet" true_out > /dev/null
' '
test_expect_success "'ipfs daemon' prompts to auto migrate" ' test_expect_success "'ipfs daemon' prompts to auto migrate" '
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论