@cryptotaxi247 / kubo / commits / 866c2c891

updates + config: moved location of current version number

Juan Batiz-Benet committed Nov 4, 2014 at 18:58 UTC 866c2c8915933af105eee246e2bb1a019a7f3e10
5 files changed +11 -8
cmd/ipfs/init.go
-1
@@ -11,7 +11,6 @@ import (
11 config "github.com/jbenet/go-ipfs/config"
12 ci "github.com/jbenet/go-ipfs/crypto"
13 peer "github.com/jbenet/go-ipfs/peer"
14 - updates "github.com/jbenet/go-ipfs/updates"
14 u "github.com/jbenet/go-ipfs/util"
15 )
16
cmd/ipfs/version.go
+4 -3
@@ -1,9 +1,10 @@
1 package main
2
3 import (
4 - "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/commander"
5 - updates "github.com/jbenet/go-ipfs/updates"
4 + config "github.com/jbenet/go-ipfs/config"
5 u "github.com/jbenet/go-ipfs/util"
6 +
7 + "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/commander"
8 )
9
10 var cmdIpfsVersion = &commander.Command{
@@ -25,6 +26,6 @@ func versionCmd(c *commander.Command, _ []string) error {
26 if !number {
27 u.POut("ipfs version ")
28 }
28 - u.POut("%s\n", updates.Version)
29 + u.POut("%s\n", config.CurrentVersionNumber)
30 return nil
31 }
config/version.go
+3
@@ -7,6 +7,9 @@ import (
7 "time"
8 )
9
10 +// CurrentVersionNumber is the current application's version literal
11 +const CurrentVersionNumber = "0.1.5"
12 +
13 // Version regulates checking if the most recent version is run
14 type Version struct {
15 // Current is the ipfs version for which config was generated
net/handshake/handshake1.go
+2 -2
@@ -4,15 +4,15 @@ import (
4 "errors"
5 "fmt"
6
7 + config "github.com/jbenet/go-ipfs/config"
8 pb "github.com/jbenet/go-ipfs/net/handshake/pb"
8 - updates "github.com/jbenet/go-ipfs/updates"
9
10 semver "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/coreos/go-semver/semver"
11 )
12
13 // ipfsVersion holds the current protocol version for a client running this code
14 var ipfsVersion *semver.Version
15 -var clientVersion = "go-ipfs/" + updates.Version
15 +var clientVersion = "go-ipfs/" + config.CurrentVersionNumber
16
17 func init() {
18 var err error
updates/updates.go
+2 -2
@@ -5,7 +5,7 @@ import (
5 "os"
6 "time"
7
8 - "github.com/jbenet/go-ipfs/config"
8 + config "github.com/jbenet/go-ipfs/config"
9 u "github.com/jbenet/go-ipfs/util"
10
11 semver "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/coreos/go-semver/semver"
@@ -15,7 +15,7 @@ import (
15
16 const (
17 // Version is the current application's version literal
18 - Version = "0.1.5"
18 + Version = config.CurrentVersionNumber
19
20 updateEndpointURL = "https://api.equinox.io/1/Updates"
21 updateAppID = "ap_YM8nz6rGm1UPg_bf63Lw6Vjz49"