diff --git a/cmd/ipfs/Rules.mk b/cmd/ipfs/Rules.mk index 2a5b07edf..167dd89cb 100644 --- a/cmd/ipfs/Rules.mk +++ b/cmd/ipfs/Rules.mk @@ -13,7 +13,7 @@ PATH := $(realpath $(d)):$(PATH) # DEPS_OO_$(d) += merkledag/pb/merkledag.pb.go namesys/pb/namesys.pb.go # DEPS_OO_$(d) += pin/internal/pb/header.pb.go unixfs/pb/unixfs.pb.go -$(d)_flags =-ldflags="-X "github.com/ipfs/go-ipfs/repo/config".CurrentCommit=$(git-hash)" +$(d)_flags =-ldflags="-X "github.com/ipfs/go-ipfs/repo".CurrentCommit=$(git-hash)" $(d)-try-build $(IPFS_BIN_$(d)): GOFLAGS += $(cmd/ipfs_flags) diff --git a/cmd/ipfs/init.go b/cmd/ipfs/init.go index 3baaa92c6..92fc6d05f 100644 --- a/cmd/ipfs/init.go +++ b/cmd/ipfs/init.go @@ -17,7 +17,7 @@ import ( fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" "gx/ipfs/QmbWGdyATxHpmbDC2z7zMNnmPmiHCRXS5f2vyxBfgz8bVb/go-ipfs-cmds" - "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" + "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" "gx/ipfs/QmdE4gMduCKCGAcczM2F5ioYDfdeKuPix138wrES1YSr7f/go-ipfs-cmdkit" ) diff --git a/cmd/ipfs/main.go b/cmd/ipfs/main.go index 2e59a5561..c43c3c675 100644 --- a/cmd/ipfs/main.go +++ b/cmd/ipfs/main.go @@ -33,7 +33,7 @@ import ( "gx/ipfs/QmbWGdyATxHpmbDC2z7zMNnmPmiHCRXS5f2vyxBfgz8bVb/go-ipfs-cmds/cli" "gx/ipfs/QmbWGdyATxHpmbDC2z7zMNnmPmiHCRXS5f2vyxBfgz8bVb/go-ipfs-cmds/http" loggables "gx/ipfs/QmcEC2rbyMxUMgpLwt16wquaZdG1aPXcpbKYf4Fedt7hkD/go-libp2p-loggables" - "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" + "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" ) // log is the command logger diff --git a/cmd/ipfswatch/main.go b/cmd/ipfswatch/main.go index 580c9d8b2..80918f12e 100644 --- a/cmd/ipfswatch/main.go +++ b/cmd/ipfswatch/main.go @@ -13,8 +13,8 @@ import ( core "github.com/ipfs/go-ipfs/core" corehttp "github.com/ipfs/go-ipfs/core/corehttp" coreunix "github.com/ipfs/go-ipfs/core/coreunix" - config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" homedir "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/mitchellh/go-homedir" diff --git a/commands/request.go b/commands/request.go index 5a07d7ec7..f32c99a1f 100644 --- a/commands/request.go +++ b/commands/request.go @@ -10,7 +10,7 @@ import ( coreapi "github.com/ipfs/go-ipfs/core/coreapi" coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" "gx/ipfs/QmbWGdyATxHpmbDC2z7zMNnmPmiHCRXS5f2vyxBfgz8bVb/go-ipfs-cmds" "gx/ipfs/QmdE4gMduCKCGAcczM2F5ioYDfdeKuPix138wrES1YSr7f/go-ipfs-cmdkit" "gx/ipfs/QmdE4gMduCKCGAcczM2F5ioYDfdeKuPix138wrES1YSr7f/go-ipfs-cmdkit/files" diff --git a/core/bootstrap.go b/core/bootstrap.go index e8ff3707f..9d2d1c376 100644 --- a/core/bootstrap.go +++ b/core/bootstrap.go @@ -19,7 +19,7 @@ import ( inet "gx/ipfs/QmVwU7Mgwg6qaPn9XXz93ANfq1PTxcduGRzfe41Sygg4mR/go-libp2p-net" pstore "gx/ipfs/QmYLXCWN2myozZpx8Wx4UjrRuQuhY3YtWoMi6SHaXii6aM/go-libp2p-peerstore" peer "gx/ipfs/QmcZSzKEM5yDfpZbeEEZaVmaZ1zXm6JWTbrQZSB8hCVPzk/go-libp2p-peer" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" ) // ErrNotEnoughBootstrapPeers signals that we do not have enough bootstrap diff --git a/core/bootstrap_test.go b/core/bootstrap_test.go index 159610a28..1993bdafe 100644 --- a/core/bootstrap_test.go +++ b/core/bootstrap_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" - config "github.com/ipfs/go-ipfs/repo/config" testutil "gx/ipfs/QmXG74iiKQnDstVQq9fPFQEB6JTNSWBbAWE1qsq6L4E5sR/go-testutil" pstore "gx/ipfs/QmYLXCWN2myozZpx8Wx4UjrRuQuhY3YtWoMi6SHaXii6aM/go-libp2p-peerstore" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" ) func TestSubsetWhenMaxIsGreaterThanLengthOfSlice(t *testing.T) { diff --git a/core/builder.go b/core/builder.go index b3dbb92b8..29ec0db51 100644 --- a/core/builder.go +++ b/core/builder.go @@ -33,7 +33,7 @@ import ( retry "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore/retrystore" dsync "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore/sync" metrics "gx/ipfs/QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q/go-metrics-interface" - cfg "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" + cfg "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" ) type BuildCfg struct { diff --git a/core/commands/bootstrap.go b/core/commands/bootstrap.go index 20ea62fe4..7d985c5d5 100644 --- a/core/commands/bootstrap.go +++ b/core/commands/bootstrap.go @@ -11,7 +11,7 @@ import ( repo "github.com/ipfs/go-ipfs/repo" "github.com/ipfs/go-ipfs/repo/fsrepo" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" "gx/ipfs/QmdE4gMduCKCGAcczM2F5ioYDfdeKuPix138wrES1YSr7f/go-ipfs-cmdkit" ) diff --git a/core/commands/config.go b/core/commands/config.go index fe2513c17..c7ceca439 100644 --- a/core/commands/config.go +++ b/core/commands/config.go @@ -16,7 +16,7 @@ import ( repo "github.com/ipfs/go-ipfs/repo" fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" "gx/ipfs/QmdE4gMduCKCGAcczM2F5ioYDfdeKuPix138wrES1YSr7f/go-ipfs-cmdkit" ) diff --git a/core/commands/env.go b/core/commands/env.go index d6e3b4d8b..e08fe77e5 100644 --- a/core/commands/env.go +++ b/core/commands/env.go @@ -8,7 +8,7 @@ import ( coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" cmds "gx/ipfs/QmbWGdyATxHpmbDC2z7zMNnmPmiHCRXS5f2vyxBfgz8bVb/go-ipfs-cmds" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" ) // GetNode extracts the node from the environment. diff --git a/core/commands/mount_unix.go b/core/commands/mount_unix.go index 7efbe68d7..6b09e005f 100644 --- a/core/commands/mount_unix.go +++ b/core/commands/mount_unix.go @@ -11,7 +11,7 @@ import ( e "github.com/ipfs/go-ipfs/core/commands/e" nodeMount "github.com/ipfs/go-ipfs/fuse/node" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" "gx/ipfs/QmdE4gMduCKCGAcczM2F5ioYDfdeKuPix138wrES1YSr7f/go-ipfs-cmdkit" ) diff --git a/core/commands/repo.go b/core/commands/repo.go index c24be4945..a317c455c 100644 --- a/core/commands/repo.go +++ b/core/commands/repo.go @@ -17,7 +17,7 @@ import ( bstore "gx/ipfs/QmRNFh4wm6FgTDrtsWmnvEP9NTuEa3Ykf72y1LXCyevbGW/go-ipfs-blockstore" cid "gx/ipfs/QmYVNvtQkeZ6AKSwDrjQTs432QtL6umrrK41EBq3cu7iSP/go-cid" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" cmds "gx/ipfs/QmbWGdyATxHpmbDC2z7zMNnmPmiHCRXS5f2vyxBfgz8bVb/go-ipfs-cmds" cmdkit "gx/ipfs/QmdE4gMduCKCGAcczM2F5ioYDfdeKuPix138wrES1YSr7f/go-ipfs-cmdkit" ) diff --git a/core/commands/swarm.go b/core/commands/swarm.go index a48c7bff7..3a663413a 100644 --- a/core/commands/swarm.go +++ b/core/commands/swarm.go @@ -20,7 +20,7 @@ import ( pstore "gx/ipfs/QmYLXCWN2myozZpx8Wx4UjrRuQuhY3YtWoMi6SHaXii6aM/go-libp2p-peerstore" ma "gx/ipfs/QmYmsdtJ3HsodkePE3eU3TsCaP2YvPZJ4LoXnNkDE5Tpt7/go-multiaddr" peer "gx/ipfs/QmcZSzKEM5yDfpZbeEEZaVmaZ1zXm6JWTbrQZSB8hCVPzk/go-libp2p-peer" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" cmdkit "gx/ipfs/QmdE4gMduCKCGAcczM2F5ioYDfdeKuPix138wrES1YSr7f/go-ipfs-cmdkit" swarm "gx/ipfs/QmdjC8HtKZpEufBL1u7WxvQn78Lqq2Wk31NJS8WvFX3crB/go-libp2p-swarm" ) diff --git a/core/commands/sysdiag.go b/core/commands/sysdiag.go index 63ac93b81..840772c22 100644 --- a/core/commands/sysdiag.go +++ b/core/commands/sysdiag.go @@ -6,10 +6,10 @@ import ( "runtime" cmds "github.com/ipfs/go-ipfs/commands" + "github.com/ipfs/go-ipfs/repo" manet "gx/ipfs/QmV6FjemM1K8oXjrvuq3wuVWWoU2TLDPmNnKrxHzY3v6Ai/go-multiaddr-net" sysi "gx/ipfs/QmZRjKbHa6DenStpQJFiaPcEwkZqrx7TH6xTf342LDU3qM/go-sysinfo" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" "gx/ipfs/QmdE4gMduCKCGAcczM2F5ioYDfdeKuPix138wrES1YSr7f/go-ipfs-cmdkit" ) @@ -57,8 +57,8 @@ Prints out information about your computer to aid in easier debugging. return } - info["ipfs_version"] = config.CurrentVersionNumber - info["ipfs_commit"] = config.CurrentCommit + info["ipfs_version"] = repo.CurrentVersionNumber + info["ipfs_commit"] = repo.CurrentCommit res.SetOutput(info) }, } diff --git a/core/commands/version.go b/core/commands/version.go index 2cee23310..b4084ce48 100644 --- a/core/commands/version.go +++ b/core/commands/version.go @@ -8,9 +8,9 @@ import ( cmds "github.com/ipfs/go-ipfs/commands" e "github.com/ipfs/go-ipfs/core/commands/e" + repo "github.com/ipfs/go-ipfs/repo" fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" "gx/ipfs/QmdE4gMduCKCGAcczM2F5ioYDfdeKuPix138wrES1YSr7f/go-ipfs-cmdkit" ) @@ -36,8 +36,8 @@ var VersionCmd = &cmds.Command{ }, Run: func(req cmds.Request, res cmds.Response) { res.SetOutput(&VersionOutput{ - Version: config.CurrentVersionNumber, - Commit: config.CurrentCommit, + Version: repo.CurrentVersionNumber, + Commit: repo.CurrentCommit, Repo: fmt.Sprint(fsrepo.RepoVersion), System: runtime.GOARCH + "/" + runtime.GOOS, //TODO: Precise version here Golang: runtime.Version(), diff --git a/core/core.go b/core/core.go index 857ff2236..8912e74fa 100644 --- a/core/core.go +++ b/core/core.go @@ -74,7 +74,7 @@ import ( ifconnmgr "gx/ipfs/QmeJbAMK4cZc1RMChb68h9t2jqvK8miqE8oQiwGAf4EdQq/go-libp2p-interface-connmgr" ds "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore" routing "gx/ipfs/QmewrvpGvgK9qkCtXsGNwXiQzyux4jcHNjoyVrGdsgtNK5/go-libp2p-routing" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" ) const IpnsValidatorTag = "ipns" @@ -94,7 +94,7 @@ const ( ) func init() { - identify.ClientVersion = "go-ipfs/" + config.CurrentVersionNumber + "/" + config.CurrentCommit + identify.ClientVersion = "go-ipfs/" + repo.CurrentVersionNumber + "/" + repo.CurrentCommit } // IpfsNode is IPFS Core module. It represents an IPFS instance. diff --git a/core/core_test.go b/core/core_test.go index 28311306b..7c77f4fe3 100644 --- a/core/core_test.go +++ b/core/core_test.go @@ -6,8 +6,8 @@ import ( context "context" "github.com/ipfs/go-ipfs/repo" - config "github.com/ipfs/go-ipfs/repo/config" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" datastore "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore" syncds "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore/sync" ) diff --git a/core/coreapi/unixfs_test.go b/core/coreapi/unixfs_test.go index fa2c6998e..096205cf1 100644 --- a/core/coreapi/unixfs_test.go +++ b/core/coreapi/unixfs_test.go @@ -16,10 +16,10 @@ import ( coreunix "github.com/ipfs/go-ipfs/core/coreunix" keystore "github.com/ipfs/go-ipfs/keystore" repo "github.com/ipfs/go-ipfs/repo" - config "github.com/ipfs/go-ipfs/repo/config" + unixfs "gx/ipfs/QmWJRM6rLjXGEXb5JkKu17Y68eJtCFcKPyRhb8JH2ELZ2Q/go-unixfs" mdag "gx/ipfs/QmXkZeJmx4c3ddjw81DQMUpM1e5LjAack5idzZYWUb2qAJ/go-merkledag" - + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" cbor "gx/ipfs/QmWrbExtUaQQHjJ8FVVDAWj5o1MRAELDUV3VmoQsZHHb6L/go-ipld-cbor" peer "gx/ipfs/QmcZSzKEM5yDfpZbeEEZaVmaZ1zXm6JWTbrQZSB8hCVPzk/go-libp2p-peer" diff --git a/core/corehttp/commands.go b/core/corehttp/commands.go index 9318f7110..905d48c8f 100644 --- a/core/corehttp/commands.go +++ b/core/corehttp/commands.go @@ -12,11 +12,12 @@ import ( oldcmds "github.com/ipfs/go-ipfs/commands" core "github.com/ipfs/go-ipfs/core" corecommands "github.com/ipfs/go-ipfs/core/commands" + repo "github.com/ipfs/go-ipfs/repo" path "gx/ipfs/QmPqCBrmkm7jNfYi7xFS7mUZsrN6DEumBMrxLnL7axNJx1/go-path" cmds "gx/ipfs/QmbWGdyATxHpmbDC2z7zMNnmPmiHCRXS5f2vyxBfgz8bVb/go-ipfs-cmds" cmdsHttp "gx/ipfs/QmbWGdyATxHpmbDC2z7zMNnmPmiHCRXS5f2vyxBfgz8bVb/go-ipfs-cmds/http" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" ) var ( @@ -77,7 +78,7 @@ func addHeadersFromConfig(c *cmdsHttp.ServerConfig, nc *config.Config) { for h, v := range nc.API.HTTPHeaders { c.Headers[h] = v } - c.Headers["Server"] = []string{"go-ipfs/" + config.CurrentVersionNumber} + c.Headers["Server"] = []string{"go-ipfs/" + repo.CurrentVersionNumber} } func addCORSDefaults(c *cmdsHttp.ServerConfig) { @@ -152,7 +153,7 @@ func CommandsROOption(cctx oldcmds.Context) ServeOption { // CheckVersionOption returns a ServeOption that checks whether the client ipfs version matches. Does nothing when the user agent string does not contain `/go-ipfs/` func CheckVersionOption() ServeOption { - daemonVersion := config.ApiVersion + daemonVersion := repo.ApiVersion return ServeOption(func(n *core.IpfsNode, l net.Listener, parent *http.ServeMux) (*http.ServeMux, error) { mux := http.NewServeMux() diff --git a/core/corehttp/gateway.go b/core/corehttp/gateway.go index 4b2f0cd8e..f9db2a23d 100644 --- a/core/corehttp/gateway.go +++ b/core/corehttp/gateway.go @@ -7,9 +7,9 @@ import ( core "github.com/ipfs/go-ipfs/core" coreapi "github.com/ipfs/go-ipfs/core/coreapi" + repo "github.com/ipfs/go-ipfs/repo" id "gx/ipfs/QmUDzeFgYrRmHL2hUB6NZmqcBVQtUzETwmFRUc9onfSSHr/go-libp2p/p2p/protocol/identify" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" ) type GatewayConfig struct { @@ -41,7 +41,7 @@ func GatewayOption(writable bool, paths ...string) ServeOption { func VersionOption() ServeOption { return func(_ *core.IpfsNode, _ net.Listener, mux *http.ServeMux) (*http.ServeMux, error) { mux.HandleFunc("/version", func(w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, "Commit: %s\n", config.CurrentCommit) + fmt.Fprintf(w, "Commit: %s\n", repo.CurrentCommit) fmt.Fprintf(w, "Client Version: %s\n", id.ClientVersion) fmt.Fprintf(w, "Protocol Version: %s\n", id.LibP2PVersion) }) diff --git a/core/corehttp/gateway_test.go b/core/corehttp/gateway_test.go index a74bb6a5d..9c1b53180 100644 --- a/core/corehttp/gateway_test.go +++ b/core/corehttp/gateway_test.go @@ -16,12 +16,12 @@ import ( namesys "github.com/ipfs/go-ipfs/namesys" nsopts "github.com/ipfs/go-ipfs/namesys/opts" repo "github.com/ipfs/go-ipfs/repo" - config "github.com/ipfs/go-ipfs/repo/config" + path "gx/ipfs/QmPqCBrmkm7jNfYi7xFS7mUZsrN6DEumBMrxLnL7axNJx1/go-path" dag "gx/ipfs/QmXkZeJmx4c3ddjw81DQMUpM1e5LjAack5idzZYWUb2qAJ/go-merkledag" - ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" id "gx/ipfs/QmUDzeFgYrRmHL2hUB6NZmqcBVQtUzETwmFRUc9onfSSHr/go-libp2p/p2p/protocol/identify" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" datastore "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore" syncds "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore/sync" ) @@ -545,7 +545,7 @@ func TestGoGetSupport(t *testing.T) { } func TestVersion(t *testing.T) { - config.CurrentCommit = "theshortcommithash" + repo.CurrentCommit = "theshortcommithash" ns := mockNamesys{} ts, _ := newTestServerAndNode(t, ns) diff --git a/core/corehttp/option_test.go b/core/corehttp/option_test.go index c600a0603..ecc572eaa 100644 --- a/core/corehttp/option_test.go +++ b/core/corehttp/option_test.go @@ -7,7 +7,7 @@ import ( "net/http/httptest" "testing" - config "github.com/ipfs/go-ipfs/repo/config" + "github.com/ipfs/go-ipfs/repo" ) type testcasecheckversion struct { @@ -20,7 +20,7 @@ type testcasecheckversion struct { func (tc testcasecheckversion) body() string { if !tc.shouldHandle && tc.responseBody == "" { - return fmt.Sprintf("%s (%s != %s)\n", errAPIVersionMismatch, config.ApiVersion, tc.userAgent) + return fmt.Sprintf("%s (%s != %s)\n", errAPIVersionMismatch, repo.ApiVersion, tc.userAgent) } return tc.responseBody @@ -30,7 +30,7 @@ func TestCheckVersionOption(t *testing.T) { tcs := []testcasecheckversion{ {"/go-ipfs/0.1/", APIPath + "/test/", false, "", http.StatusBadRequest}, {"/go-ipfs/0.1/", APIPath + "/version", true, "check!", http.StatusOK}, - {config.ApiVersion, APIPath + "/test", true, "check!", http.StatusOK}, + {repo.ApiVersion, APIPath + "/test", true, "check!", http.StatusOK}, {"Mozilla Firefox/no go-ipfs node", APIPath + "/test", true, "check!", http.StatusOK}, {"/go-ipfs/0.1/", "/webui", true, "check!", http.StatusOK}, } diff --git a/core/coreunix/add_test.go b/core/coreunix/add_test.go index d1043ac75..667deeb9d 100644 --- a/core/coreunix/add_test.go +++ b/core/coreunix/add_test.go @@ -13,12 +13,12 @@ import ( "github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/pin/gc" "github.com/ipfs/go-ipfs/repo" - "github.com/ipfs/go-ipfs/repo/config" + dag "gx/ipfs/QmXkZeJmx4c3ddjw81DQMUpM1e5LjAack5idzZYWUb2qAJ/go-merkledag" "gx/ipfs/QmeZMtdkNG7u2CohGSL8mzAdZY2c3B1coYE91wvbzip1pF/go-blockservice" - blockstore "gx/ipfs/QmRNFh4wm6FgTDrtsWmnvEP9NTuEa3Ykf72y1LXCyevbGW/go-ipfs-blockstore" pi "gx/ipfs/QmSHjPDw8yNgLZ7cBfX7w3Smn7PHwYhNEpd4LHQQxUg35L/go-ipfs-posinfo" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" blocks "gx/ipfs/QmVzK524a2VWLqyvtBeiHKsUAWYgeAk4DBeZoY7vpNPNRx/go-block-format" cid "gx/ipfs/QmYVNvtQkeZ6AKSwDrjQTs432QtL6umrrK41EBq3cu7iSP/go-cid" files "gx/ipfs/QmdE4gMduCKCGAcczM2F5ioYDfdeKuPix138wrES1YSr7f/go-ipfs-cmdkit/files" diff --git a/core/mock/mock.go b/core/mock/mock.go index 3b50741f4..a4f08b249 100644 --- a/core/mock/mock.go +++ b/core/mock/mock.go @@ -6,7 +6,6 @@ import ( commands "github.com/ipfs/go-ipfs/commands" core "github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/repo" - config "github.com/ipfs/go-ipfs/repo/config" host "gx/ipfs/QmQ1hwb95uSSZR8jSPJysnfHxBDQAykSXsmz5TwTzxjq2Z/go-libp2p-host" libp2p "gx/ipfs/QmUDzeFgYrRmHL2hUB6NZmqcBVQtUzETwmFRUc9onfSSHr/go-libp2p" @@ -14,6 +13,7 @@ import ( testutil "gx/ipfs/QmXG74iiKQnDstVQq9fPFQEB6JTNSWBbAWE1qsq6L4E5sR/go-testutil" pstore "gx/ipfs/QmYLXCWN2myozZpx8Wx4UjrRuQuhY3YtWoMi6SHaXii6aM/go-libp2p-peerstore" peer "gx/ipfs/QmcZSzKEM5yDfpZbeEEZaVmaZ1zXm6JWTbrQZSB8hCVPzk/go-libp2p-peer" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" datastore "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore" syncds "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore/sync" ) diff --git a/docs/releases.md b/docs/releases.md index ec7be739e..54b49c531 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -9,7 +9,7 @@ will be allowed up to release day. ## Release Candidate Checklist - [ ] CHANGELOG.md has been updated - use `./bin/mkreleaselog` to generate a nice starter list -- [ ] version string in `repo/config/version.go` has been updated +- [ ] version string in `repo/version.go` has been updated - [ ] tag commit with vX.Y.Z-rcN - [ ] publish gx version with `gx publish`, as per [gx release guidelines](https://github.com/whyrusleeping/gx#publishing-and-releasing) - you will have to manually adjust the gx version to 'rc' @@ -22,7 +22,7 @@ will be allowed up to release day. - [ ] webui works (for most definitions of 'works') - Test the multiple pages and verify that no visible errors are shown. - [ ] CHANGELOG.md has been updated - use `./bin/mkreleaselog` to generate a nice starter list -- [ ] version string in `repo/config/version.go` has been updated +- [ ] version string in `repo/version.go` has been updated - [ ] tag commit with vX.Y.Z - [ ] update release branch to point to release commit - [ ] publish dist.ipfs.io @@ -30,7 +30,7 @@ will be allowed up to release day. - [ ] publish gx version with `gx release`, as per [gx release guidelines](https://github.com/whyrusleeping/gx#publishing-and-releasing) ## Post-Release -- [ ] Bump version string in `repo/config/version.go` to `vX.Y.Z-dev` +- [ ] bump version string in `repo/version.go` to `vX.Y.Z-dev` - [ ] Upload the final release to the github releases page: https://github.com/ipfs/go-ipfs/releases - Communication - [ ] Create the release issue diff --git a/docs/windows.md b/docs/windows.md index c58193955..8e55fd0b3 100644 --- a/docs/windows.md +++ b/docs/windows.md @@ -130,7 +130,7 @@ We need the `git` commit hash to be included in our build so that in the extreme Finally, we'll build and test `ipfs` itself. ``` -go install -ldflags="-X "github.com/ipfs/go-ipfs/repo/config".CurrentCommit=%SHA%" +go install -ldflags="-X "github.com/ipfs/go-ipfs/repo".CurrentCommit=%SHA%" %GOPATH%\bin\ipfs.exe version --all ``` You can check that the ipfs output versions match with `go version` and `git rev-parse --short HEAD`. diff --git a/package.json b/package.json index d23e368cf..ff07c33e9 100644 --- a/package.json +++ b/package.json @@ -578,9 +578,9 @@ }, { "author": "magik6k", - "hash": "QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU", + "hash": "QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL", "name": "go-ipfs-config", - "version": "0.1.0" + "version": "0.2.0" } ], "gxVersion": "0.10.0", diff --git a/repo/fsrepo/config_test.go b/repo/fsrepo/config_test.go index a1d549e42..ccc54f21f 100644 --- a/repo/fsrepo/config_test.go +++ b/repo/fsrepo/config_test.go @@ -7,7 +7,7 @@ import ( "reflect" "testing" - config "github.com/ipfs/go-ipfs/repo/config" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" ) // note: to test sorting of the mountpoints in the disk spec they are diff --git a/repo/fsrepo/fsrepo.go b/repo/fsrepo/fsrepo.go index 6f63202c0..d57608105 100644 --- a/repo/fsrepo/fsrepo.go +++ b/repo/fsrepo/fsrepo.go @@ -25,8 +25,8 @@ import ( logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log" ma "gx/ipfs/QmYmsdtJ3HsodkePE3eU3TsCaP2YvPZJ4LoXnNkDE5Tpt7/go-multiaddr" lockfile "gx/ipfs/QmZzgxSj8QpR58KmdeNj97eD66X6xeDAFNjpP2xTY9oKeQ/go-fs-lock" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" - serialize "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config/serialize" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" + serialize "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config/serialize" ds "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore" ) diff --git a/repo/fsrepo/fsrepo_test.go b/repo/fsrepo/fsrepo_test.go index ed3bb472e..c292dd48d 100644 --- a/repo/fsrepo/fsrepo_test.go +++ b/repo/fsrepo/fsrepo_test.go @@ -7,8 +7,9 @@ import ( "path/filepath" "testing" - "github.com/ipfs/go-ipfs/repo/config" "github.com/ipfs/go-ipfs/thirdparty/assert" + + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" datastore "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore" ) diff --git a/repo/fsrepo/misc.go b/repo/fsrepo/misc.go index 43a66ce14..808758587 100644 --- a/repo/fsrepo/misc.go +++ b/repo/fsrepo/misc.go @@ -5,7 +5,7 @@ import ( homedir "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/mitchellh/go-homedir" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" ) // BestKnownPath returns the best known fsrepo path. If the ENV override is diff --git a/repo/mock.go b/repo/mock.go index 05d851228..e6b85fe56 100644 --- a/repo/mock.go +++ b/repo/mock.go @@ -6,8 +6,8 @@ import ( filestore "github.com/ipfs/go-ipfs/filestore" keystore "github.com/ipfs/go-ipfs/keystore" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" ma "gx/ipfs/QmYmsdtJ3HsodkePE3eU3TsCaP2YvPZJ4LoXnNkDE5Tpt7/go-multiaddr" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" ) var errTODO = errors.New("TODO: mock repo") diff --git a/repo/repo.go b/repo/repo.go index 4e8590cb6..faae663a4 100644 --- a/repo/repo.go +++ b/repo/repo.go @@ -7,8 +7,8 @@ import ( filestore "github.com/ipfs/go-ipfs/filestore" keystore "github.com/ipfs/go-ipfs/keystore" + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" ma "gx/ipfs/QmYmsdtJ3HsodkePE3eU3TsCaP2YvPZJ4LoXnNkDE5Tpt7/go-multiaddr" - config "gx/ipfs/QmbfPqH4QFLQWdfXa111eBKgdTiLkZv2Pc4Qpm2byUeByU/go-ipfs-config" ds "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore" ) diff --git a/repo/version.go b/repo/version.go new file mode 100644 index 000000000..2f0a135b3 --- /dev/null +++ b/repo/version.go @@ -0,0 +1,9 @@ +package repo + +// CurrentCommit is the current git commit, this is set as a ldflag in the Makefile +var CurrentCommit string + +// CurrentVersionNumber is the current application's version literal +const CurrentVersionNumber = "0.4.17-dev" + +const ApiVersion = "/go-ipfs/" + CurrentVersionNumber + "/" diff --git a/test/bench/bench_cli_ipfs_add/main.go b/test/bench/bench_cli_ipfs_add/main.go index 5b7467fd9..d5808f8c0 100644 --- a/test/bench/bench_cli_ipfs_add/main.go +++ b/test/bench/bench_cli_ipfs_add/main.go @@ -11,8 +11,9 @@ import ( "testing" "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-random" - "github.com/ipfs/go-ipfs/repo/config" "github.com/ipfs/go-ipfs/thirdparty/unit" + + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" ) var ( diff --git a/test/bench/offline_add/main.go b/test/bench/offline_add/main.go index 9a9c71a5d..8f890ca56 100644 --- a/test/bench/offline_add/main.go +++ b/test/bench/offline_add/main.go @@ -10,8 +10,9 @@ import ( "testing" "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-random" - "github.com/ipfs/go-ipfs/repo/config" "github.com/ipfs/go-ipfs/thirdparty/unit" + + config "gx/ipfs/QmSzU7M24odFR3icDsAK8P8SQoaELzDFv3n3fTPy2grrEL/go-ipfs-config" ) func main() {