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

migrations: update dist.ipfs.io path
This commit is contained in:
Jeromy Johnson 2017-01-27 14:59:13 -08:00 committed by GitHub
commit 4add5b8a9a
2 changed files with 4 additions and 8 deletions

View File

@ -15,7 +15,7 @@ import (
"strings"
)
var DistPath = "https://ipfs.io/ipfs/QmUnvqDuRyfe7HJuiMMHv77AMUFnjGyAU28LFPeTYwGmFF"
var DistPath = "https://ipfs.io/ipfs/QmUgY7wRGB7bEKREE5BNrSwjzrRZddkRV4bu64bP2qgv7f"
func init() {
if dist := os.Getenv("IPFS_DIST_PATH"); dist != "" {
@ -35,9 +35,6 @@ func migrationsBinName() string {
}
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()
fmt.Println(" => Looking for suitable fs-repo-migrations binary.")

View File

@ -13,7 +13,7 @@ test_init_ipfs
test_expect_success "setup mock migrations" '
mkdir bin &&
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 &&
export PATH="$(pwd)/bin":$PATH
'
@ -35,9 +35,8 @@ test_expect_success "ipfs daemon --migrate=true runs migration" '
'
test_expect_success "output looks good" '
#grep "Running: " true_out > /dev/null &&
#grep "Success: fs-repo has been migrated to version 4." true_out > /dev/null
grep "No automatic migrations yet" true_out > /dev/null
grep "Running: " true_out > /dev/null &&
grep "Success: fs-repo has been migrated to version 5." true_out > /dev/null
'
test_expect_success "'ipfs daemon' prompts to auto migrate" '