updates + config: moved location of current version number

This commit is contained in:
Juan Batiz-Benet 2014-11-04 18:58:15 -08:00
parent 6ba45221d6
commit 866c2c8915
5 changed files with 11 additions and 8 deletions

View File

@ -11,7 +11,6 @@ import (
config "github.com/jbenet/go-ipfs/config"
ci "github.com/jbenet/go-ipfs/crypto"
peer "github.com/jbenet/go-ipfs/peer"
updates "github.com/jbenet/go-ipfs/updates"
u "github.com/jbenet/go-ipfs/util"
)

View File

@ -1,9 +1,10 @@
package main
import (
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/commander"
updates "github.com/jbenet/go-ipfs/updates"
config "github.com/jbenet/go-ipfs/config"
u "github.com/jbenet/go-ipfs/util"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/commander"
)
var cmdIpfsVersion = &commander.Command{
@ -25,6 +26,6 @@ func versionCmd(c *commander.Command, _ []string) error {
if !number {
u.POut("ipfs version ")
}
u.POut("%s\n", updates.Version)
u.POut("%s\n", config.CurrentVersionNumber)
return nil
}

View File

@ -7,6 +7,9 @@ import (
"time"
)
// CurrentVersionNumber is the current application's version literal
const CurrentVersionNumber = "0.1.5"
// Version regulates checking if the most recent version is run
type Version struct {
// Current is the ipfs version for which config was generated

View File

@ -4,15 +4,15 @@ import (
"errors"
"fmt"
config "github.com/jbenet/go-ipfs/config"
pb "github.com/jbenet/go-ipfs/net/handshake/pb"
updates "github.com/jbenet/go-ipfs/updates"
semver "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/coreos/go-semver/semver"
)
// ipfsVersion holds the current protocol version for a client running this code
var ipfsVersion *semver.Version
var clientVersion = "go-ipfs/" + updates.Version
var clientVersion = "go-ipfs/" + config.CurrentVersionNumber
func init() {
var err error

View File

@ -5,7 +5,7 @@ import (
"os"
"time"
"github.com/jbenet/go-ipfs/config"
config "github.com/jbenet/go-ipfs/config"
u "github.com/jbenet/go-ipfs/util"
semver "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/coreos/go-semver/semver"
@ -15,7 +15,7 @@ import (
const (
// Version is the current application's version literal
Version = "0.1.5"
Version = config.CurrentVersionNumber
updateEndpointURL = "https://api.equinox.io/1/Updates"
updateAppID = "ap_YM8nz6rGm1UPg_bf63Lw6Vjz49"