-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simpler migration without external dependency #511
Simpler migration without external dependency #511
Conversation
Git-clone means an external dependency which is hard to test. This ensures that the migration can be done locally without calling a remote repository. Thus, the migration can also be tested.
Codecov Report
@@ Coverage Diff @@
## master #511 +/- ##
==========================================
+ Coverage 57.42% 58.87% +1.44%
==========================================
Files 23 23
Lines 996 997 +1
==========================================
+ Hits 572 587 +15
+ Misses 368 350 -18
- Partials 56 60 +4
Continue to review full report at Codecov.
|
@@ -48,15 +44,22 @@ func Migrate(paths environment.Paths) error { | |||
klog.V(2).Infoln("Already migrated") | |||
return nil | |||
} | |||
indexPath := paths.IndexPath() | |||
tmpPath := filepath.Join(paths.BasePath(), "tmp_index_migration") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this wouldn't be better as os.TempDir?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TempDir would be safer of course, but I wanted to avoid moving across file systems.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahmetb, corneliusweig The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
This migrates the krew home to the new layout without an external dependency.
Related issue: #505
Also see #505 (comment)
cc @chriskim06