Skip to content

Commit

Permalink
Migration downloads individual migration binaries (#134)
Browse files Browse the repository at this point in the history
* Migration downloads individual migration binaries

When performing a migration after installing a new ipfs version, ipfs-update finds the necessary migrations, downloads the latest version of them from the distribution location, unpacks the executables, and runs the migrations in order.  It uses the code located in go-ipfs/repo/fsrepo/migrations to do this.

Also used go-ipfs/repo/fsrepo/migrations for
- fetching binaries for things other than migrations
- fetching version information about binaries other than migrations
- looking at the current repo version

* Use updated IpfsDir() and CheckIpfsDir() to use migrations lib

* Support "latest" and "beta" versions

* Unexported many fields and functions that were unnecessarily exported

* Changed Install.Run to take a context

* Updated dependencies

* Update travis-ci to use go1.16.x

Co-authored-by: Adin Schmahmann <[email protected]>
  • Loading branch information
gammazero and aschmahmann authored Apr 1, 2021
1 parent 952470e commit 18a1bc2
Show file tree
Hide file tree
Showing 16 changed files with 1,735 additions and 753 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ipfs-update
*~
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ os:
language: go

go:
- "1.13.1"
- "1.16.x"

env:
- TEST_VERBOSE=1
Expand Down
10 changes: 0 additions & 10 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,3 @@ const CurrentVersionNumber = "1.6.1-dev"
// It might not be currently available, but it might be later if we
// add a Makefile and set it as a ldflag in the Makefile.
var CurrentCommit string

func GetUserAgent() string {
ua := CurrentAppName + "/" + CurrentVersionNumber

if CurrentCommit != "" {
ua += "-" + CurrentCommit
}

return ua
}
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/ipfs/ipfs-update

go 1.12
go 1.15

require (
github.com/blang/semver v3.5.1+incompatible
github.com/coreos/go-semver v0.3.0
github.com/ipfs/go-ipfs-api v0.0.2
github.com/urfave/cli v1.22.1
github.com/ipfs/go-ipfs v0.8.1-0.20210331210551-bb8260abe11b
github.com/ipfs/go-ipfs-api v0.2.0
github.com/urfave/cli/v2 v2.3.0
github.com/whyrusleeping/stump v0.0.0-20160611222256-206f8f13aae1
golang.org/x/sys v0.0.0-20191118133127-cf1e2d577169
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2
)
1,324 changes: 1,297 additions & 27 deletions go.sum

Large diffs are not rendered by default.

105 changes: 0 additions & 105 deletions lib/archive.go

This file was deleted.

Loading

0 comments on commit 18a1bc2

Please sign in to comment.