generated from ipfs/ipfs-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rename migrate -> boxo-migrate, add extra pointers to output
- Loading branch information
Showing
7 changed files
with
54 additions
and
7 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ import ( | |
"os" | ||
"strings" | ||
|
||
migrate "github.com/ipfs/boxo/cmd/migrate/internal" | ||
migrate "github.com/ipfs/boxo/cmd/boxo-migrate/internal" | ||
"github.com/urfave/cli/v2" | ||
) | ||
|
||
|
@@ -64,10 +64,31 @@ func main() { | |
if err != nil { | ||
return err | ||
} | ||
|
||
fmt.Printf("\n\n") | ||
|
||
if !dryrun { | ||
err := migrator.GoGet("github.com/ipfs/[email protected]") | ||
if err != nil { | ||
return err | ||
} | ||
} | ||
|
||
if err := migrator.UpdateImports(); err != nil { | ||
return err | ||
} | ||
|
||
if dryrun { | ||
return nil | ||
} | ||
|
||
if err := migrator.GoModTidy(); err != nil { | ||
return err | ||
} | ||
|
||
fmt.Printf("Your code has been successfully updated. Note that you might still need to manually fix up parts of your code.\n\n") | ||
fmt.Printf("You should also consider running the 'boxo-migrate check-dependencies' command to see if you have any other dependencies on migrated code.\n\n") | ||
|
||
return nil | ||
}, | ||
}, | ||
|
@@ -88,7 +109,7 @@ func main() { | |
} | ||
if len(deps) > 0 { | ||
fmt.Println(strings.Join([]string{ | ||
"You still have dependencies on repos which have migrated to go-libipfs.", | ||
"You still have dependencies on repos which have migrated to Boxo.", | ||
"You should consider not having these dependencies to avoid multiple versions of the same code.", | ||
"You can use 'go mod why' or 'go mod graph' to find the reason for these dependencies.", | ||
"", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module github.com/ipfs/boxo/cmd/migrate | ||
module github.com/ipfs/boxo/cmd/boxo-migrate | ||
|
||
go 1.19 | ||
|
||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters