diff --git a/cmd/identity/main.go b/cmd/identity/main.go index c45cc2f6c..fd7ea8bfa 100644 --- a/cmd/identity/main.go +++ b/cmd/identity/main.go @@ -22,9 +22,9 @@ import ( "storj.io/common/rpc" "storj.io/private/cfgstruct" "storj.io/private/process" + "storj.io/private/version" "storj.io/storj/certificate/certificateclient" "storj.io/storj/pkg/revocation" - "storj.io/storj/private/version" "storj.io/storj/private/version/checker" ) diff --git a/cmd/satellite/admin.go b/cmd/satellite/admin.go index 6077cb4fb..aa9d5dae9 100644 --- a/cmd/satellite/admin.go +++ b/cmd/satellite/admin.go @@ -9,8 +9,8 @@ import ( "go.uber.org/zap" "storj.io/private/process" + "storj.io/private/version" "storj.io/storj/pkg/revocation" - "storj.io/storj/private/version" "storj.io/storj/satellite" "storj.io/storj/satellite/metainfo" "storj.io/storj/satellite/satellitedb" diff --git a/cmd/satellite/api.go b/cmd/satellite/api.go index c63120528..c0733b64e 100644 --- a/cmd/satellite/api.go +++ b/cmd/satellite/api.go @@ -10,8 +10,8 @@ import ( "storj.io/common/context2" "storj.io/private/process" + "storj.io/private/version" "storj.io/storj/pkg/revocation" - "storj.io/storj/private/version" "storj.io/storj/satellite" "storj.io/storj/satellite/accounting/live" "storj.io/storj/satellite/metainfo" diff --git a/cmd/satellite/gc.go b/cmd/satellite/gc.go index f05948144..ff82bec0a 100644 --- a/cmd/satellite/gc.go +++ b/cmd/satellite/gc.go @@ -9,8 +9,8 @@ import ( "go.uber.org/zap" "storj.io/private/process" + "storj.io/private/version" "storj.io/storj/pkg/revocation" - "storj.io/storj/private/version" "storj.io/storj/satellite" "storj.io/storj/satellite/metainfo" "storj.io/storj/satellite/satellitedb" diff --git a/cmd/satellite/main.go b/cmd/satellite/main.go index 86edc963b..3b114df5d 100644 --- a/cmd/satellite/main.go +++ b/cmd/satellite/main.go @@ -21,10 +21,10 @@ import ( "storj.io/common/storj" "storj.io/private/cfgstruct" "storj.io/private/process" + "storj.io/private/version" "storj.io/storj/cmd/satellite/reports" "storj.io/storj/pkg/cache" "storj.io/storj/pkg/revocation" - "storj.io/storj/private/version" "storj.io/storj/satellite" "storj.io/storj/satellite/accounting/live" "storj.io/storj/satellite/metainfo" diff --git a/cmd/satellite/repairer.go b/cmd/satellite/repairer.go index 80d43018b..6a2f43b13 100644 --- a/cmd/satellite/repairer.go +++ b/cmd/satellite/repairer.go @@ -10,8 +10,8 @@ import ( "storj.io/common/context2" "storj.io/private/process" + "storj.io/private/version" "storj.io/storj/pkg/revocation" - "storj.io/storj/private/version" "storj.io/storj/satellite" "storj.io/storj/satellite/metainfo" "storj.io/storj/satellite/orders" diff --git a/cmd/storagenode-updater/main.go b/cmd/storagenode-updater/main.go index 269c67e0b..d009461b7 100644 --- a/cmd/storagenode-updater/main.go +++ b/cmd/storagenode-updater/main.go @@ -33,7 +33,7 @@ import ( "storj.io/common/sync2" "storj.io/private/cfgstruct" "storj.io/private/process" - "storj.io/storj/private/version" + "storj.io/private/version" "storj.io/storj/private/version/checker" ) diff --git a/cmd/storagenode/dashboard.go b/cmd/storagenode/dashboard.go index bb50cabb0..0a8390065 100644 --- a/cmd/storagenode/dashboard.go +++ b/cmd/storagenode/dashboard.go @@ -22,7 +22,7 @@ import ( "storj.io/common/pb" "storj.io/common/rpc" "storj.io/private/process" - "storj.io/storj/private/version" + "storj.io/private/version" ) const contactWindow = time.Hour * 2 diff --git a/cmd/storagenode/main.go b/cmd/storagenode/main.go index c96f70d0c..58300ff08 100644 --- a/cmd/storagenode/main.go +++ b/cmd/storagenode/main.go @@ -20,8 +20,8 @@ import ( "storj.io/common/storj" "storj.io/private/cfgstruct" "storj.io/private/process" + "storj.io/private/version" "storj.io/storj/pkg/revocation" - "storj.io/storj/private/version" "storj.io/storj/storagenode" "storj.io/storj/storagenode/storagenodedb" ) diff --git a/go.mod b/go.mod index 8e7efd9ad..d37f8ecf5 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.13 require ( github.com/alessio/shellescape v0.0.0-20190409004728-b115ca0f9053 github.com/alicebob/miniredis/v2 v2.11.1 - github.com/blang/semver v3.5.1+incompatible github.com/btcsuite/btcutil v1.0.1 github.com/cheggaaa/pb/v3 v3.0.1 github.com/fatih/color v1.7.0 diff --git a/private/testplanet/satellite.go b/private/testplanet/satellite.go index 6c4447f1f..7887fc3bc 100644 --- a/private/testplanet/satellite.go +++ b/private/testplanet/satellite.go @@ -23,9 +23,9 @@ import ( "storj.io/common/rpc" "storj.io/common/storj" "storj.io/private/debug" + "storj.io/private/version" "storj.io/storj/pkg/revocation" "storj.io/storj/pkg/server" - "storj.io/storj/private/version" versionchecker "storj.io/storj/private/version/checker" "storj.io/storj/satellite" "storj.io/storj/satellite/accounting" diff --git a/private/testplanet/versioning.go b/private/testplanet/versioning.go index b463d5be1..abcc8e425 100644 --- a/private/testplanet/versioning.go +++ b/private/testplanet/versioning.go @@ -9,7 +9,7 @@ import ( "path/filepath" "time" - "storj.io/storj/private/version" + "storj.io/private/version" "storj.io/storj/private/version/checker" "storj.io/storj/versioncontrol" ) diff --git a/private/version/checker/client.go b/private/version/checker/client.go index e22cd91b3..f12f13f4a 100644 --- a/private/version/checker/client.go +++ b/private/version/checker/client.go @@ -16,7 +16,7 @@ import ( "github.com/spacemonkeygo/monkit/v3" "github.com/zeebo/errs" - "storj.io/storj/private/version" + "storj.io/private/version" ) var ( diff --git a/private/version/checker/client_test.go b/private/version/checker/client_test.go index b86a8c63e..cdf146c23 100644 --- a/private/version/checker/client_test.go +++ b/private/version/checker/client_test.go @@ -13,7 +13,7 @@ import ( "go.uber.org/zap/zaptest" "storj.io/common/testcontext" - "storj.io/storj/private/version" + "storj.io/private/version" "storj.io/storj/private/version/checker" "storj.io/storj/versioncontrol" ) diff --git a/private/version/checker/service.go b/private/version/checker/service.go index 5f047c123..05aaeda1b 100644 --- a/private/version/checker/service.go +++ b/private/version/checker/service.go @@ -13,7 +13,7 @@ import ( "go.uber.org/zap" "storj.io/common/sync2" - "storj.io/storj/private/version" + "storj.io/private/version" ) // Config contains the necessary Information to check the Software Version diff --git a/private/version/stats.go b/private/version/stats.go deleted file mode 100644 index 1089d93c2..000000000 --- a/private/version/stats.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2019 Storj Labs, Inc. -// See LICENSE for copying information. - -package version - -import ( - "hash/crc32" - "sync/atomic" - - "github.com/spacemonkeygo/monkit/v3" -) - -// Stats implements the monkit.StatSource interface -func (info *Info) Stats(cb func(key monkit.SeriesKey, field string, val float64)) { - key := monkit.NewSeriesKey("version_info") - - if info.Release { - cb(key, "release", 1) - } else { - cb(key, "release", 0) - } - if !info.Timestamp.IsZero() { - cb(key, "timestamp", float64(info.Timestamp.Unix())) - } - crc := atomic.LoadUint32(&info.commitHashCRC) - if crc == 0 { - c := crc32.NewIEEE() - _, err := c.Write([]byte(buildCommitHash)) - if err != nil { - panic(err) - } - atomic.StoreUint32(&info.commitHashCRC, c.Sum32()) - } - cb(key, "commit", float64(crc)) - cb(key, "major", float64(info.Version.Major)) - cb(key, "minor", float64(info.Version.Minor)) - cb(key, "patch", float64(info.Version.Patch)) -} diff --git a/private/version/version.go b/private/version/version.go deleted file mode 100644 index 62b5977d1..000000000 --- a/private/version/version.go +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright (C) 2019 Storj Labs, Inc. -// See LICENSE for copying information. - -package version - -import ( - "bytes" - "crypto/hmac" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "fmt" - "math/big" - "reflect" - "strconv" - "strings" - "time" - - "github.com/blang/semver" - "github.com/zeebo/errs" - - "storj.io/common/pb" - "storj.io/common/storj" -) - -const quote = byte('"') - -var ( - // VerError is the error class for version-related errors. - VerError = errs.Class("version error") - - // the following fields are set by linker flags. if any of them - // are set and fail to parse, the program will fail to start - buildTimestamp string // unix seconds since epoch - buildCommitHash string - buildVersion string // semantic version format - buildRelease string // true/false - - // Build is a struct containing all relevant build information associated with the binary - Build Info -) - -// Info is the versioning information for a binary -type Info struct { - // sync/atomic cache - commitHashCRC uint32 - - Timestamp time.Time `json:"timestamp,omitempty"` - CommitHash string `json:"commitHash,omitempty"` - Version SemVer `json:"version"` - Release bool `json:"release,omitempty"` -} - -// SemVer represents a semantic version. -// TODO: replace with semver.Version -type SemVer struct { - semver.Version -} - -// OldSemVer represents a semantic version. -// NB: this will be deprecated in favor of `SemVer`; these structs marshal to JSON differently. -type OldSemVer struct { - Major int64 `json:"major"` - Minor int64 `json:"minor"` - Patch int64 `json:"patch"` -} - -// AllowedVersions provides the Minimum SemVer per Service. -// TODO: I don't think this name is representative of what this struct now holds. -type AllowedVersions struct { - Satellite OldSemVer - Storagenode OldSemVer - Uplink OldSemVer - Gateway OldSemVer - Identity OldSemVer - - Processes Processes `json:"processes"` -} - -// Processes describes versions for each binary. -// TODO: this name is inconsistent with the versioncontrol server pkg's analogue, `Versions`. -type Processes struct { - Satellite Process `json:"satellite"` - Storagenode Process `json:"storagenode"` - StoragenodeUpdater Process `json:"storagenode-updater"` - Uplink Process `json:"uplink"` - Gateway Process `json:"gateway"` - Identity Process `json:"identity"` -} - -// Process versions for specific binary. -type Process struct { - Minimum Version `json:"minimum"` - Suggested Version `json:"suggested"` - Rollout Rollout `json:"rollout"` -} - -// Version represents version and download URL for binary. -type Version struct { - Version string `json:"version"` - URL string `json:"url"` -} - -// Rollout represents the state of a version rollout. -type Rollout struct { - Seed RolloutBytes `json:"seed"` - Cursor RolloutBytes `json:"cursor"` -} - -// RolloutBytes implements json un/marshalling using hex de/encoding. -type RolloutBytes [32]byte - -// MarshalJSON hex-encodes RolloutBytes and pre/appends JSON string literal quotes. -func (rb RolloutBytes) MarshalJSON() ([]byte, error) { - zeroRolloutBytes := RolloutBytes{} - if bytes.Equal(rb[:], zeroRolloutBytes[:]) { - return []byte{quote, quote}, nil - } - - hexBytes := make([]byte, hex.EncodedLen(len(rb))) - hex.Encode(hexBytes, rb[:]) - encoded := append([]byte{quote}, hexBytes...) - encoded = append(encoded, quote) - return encoded, nil -} - -// UnmarshalJSON drops the JSON string literal quotes and hex-decodes RolloutBytes . -func (rb *RolloutBytes) UnmarshalJSON(b []byte) error { - if _, err := hex.Decode(rb[:], b[1:len(b)-1]); err != nil { - return VerError.Wrap(err) - } - return nil -} - -// NewSemVer parses a given version and returns an instance of SemVer or -// an error if unable to parse the version. -func NewSemVer(v string) (SemVer, error) { - ver, err := semver.ParseTolerant(v) - if err != nil { - return SemVer{}, VerError.Wrap(err) - } - - return SemVer{ - Version: ver, - }, nil -} - -// NewOldSemVer parses a given version and returns an instance of OldSemVer or -// an error if unable to parse the version. -func NewOldSemVer(v string) (OldSemVer, error) { - ver, err := NewSemVer(v) - if err != nil { - return OldSemVer{}, err - } - - return OldSemVer{ - Major: int64(ver.Major), - Minor: int64(ver.Minor), - Patch: int64(ver.Patch), - }, nil -} - -// Compare compare two versions, return -1 if compared version is greater, 0 if equal and 1 if less. -func (sem *SemVer) Compare(version SemVer) int { - return sem.Version.Compare(version.Version) -} - -// String converts the SemVer struct to a more easy to handle string -func (sem *SemVer) String() (version string) { - return fmt.Sprintf("v%d.%d.%d", sem.Major, sem.Minor, sem.Patch) -} - -// IsZero checks if the semantic version is its zero value. -func (sem SemVer) IsZero() bool { - return reflect.ValueOf(sem).IsZero() -} - -func (old OldSemVer) String() string { - return fmt.Sprintf("v%d.%d.%d", old.Major, old.Minor, old.Patch) -} - -// SemVer converts a version struct into a semantic version struct. -func (ver *Version) SemVer() (SemVer, error) { - return NewSemVer(ver.Version) -} - -// New creates Version_Info from a json byte array -func New(data []byte) (v Info, err error) { - err = json.Unmarshal(data, &v) - return v, VerError.Wrap(err) -} - -// IsZero checks if the version struct is its zero value. -func (info Info) IsZero() bool { - return reflect.ValueOf(info).IsZero() -} - -// Marshal converts the existing Version Info to any json byte array -func (info Info) Marshal() ([]byte, error) { - data, err := json.Marshal(info) - if err != nil { - return nil, VerError.Wrap(err) - } - return data, nil -} - -// Proto converts an Info struct to a pb.NodeVersion -// TODO: shouldn't we just use pb.NodeVersion everywhere? gogoproto will let -// us make it match Info. -func (info Info) Proto() (*pb.NodeVersion, error) { - return &pb.NodeVersion{ - Version: info.Version.String(), - CommitHash: info.CommitHash, - Timestamp: info.Timestamp, - Release: info.Release, - }, nil -} - -// PercentageToCursor calculates the cursor value for the given percentage of nodes which should update. -func PercentageToCursor(pct int) RolloutBytes { - // NB: convert the max value to a number, multiply by the percentage, convert back. - var maxInt, maskInt big.Int - var maxBytes RolloutBytes - for i := 0; i < len(maxBytes); i++ { - maxBytes[i] = 255 - } - maxInt.SetBytes(maxBytes[:]) - maskInt.Div(maskInt.Mul(&maxInt, big.NewInt(int64(pct))), big.NewInt(100)) - - var cursor RolloutBytes - copy(cursor[:], maskInt.Bytes()) - - return cursor -} - -// ShouldUpdate checks if for the the given rollout state, a user with the given nodeID should update. -func ShouldUpdate(rollout Rollout, nodeID storj.NodeID) bool { - hash := hmac.New(sha256.New, rollout.Seed[:]) - _, err := hash.Write(nodeID[:]) - if err != nil { - panic(err) - } - return bytes.Compare(hash.Sum(nil), rollout.Cursor[:]) <= 0 -} - -func init() { - if buildVersion == "" && buildTimestamp == "" && buildCommitHash == "" && buildRelease == "" { - return - } - timestamp, err := strconv.ParseInt(buildTimestamp, 10, 64) - if err != nil { - panic(VerError.Wrap(err)) - } - Build = Info{ - Timestamp: time.Unix(timestamp, 0), - CommitHash: buildCommitHash, - Release: strings.ToLower(buildRelease) == "true", - } - - sv, err := NewSemVer(buildVersion) - if err != nil { - panic(err) - } - - Build.Version = sv - - if Build.Timestamp.Unix() == 0 || Build.CommitHash == "" { - Build.Release = false - } -} diff --git a/private/version/version_test.go b/private/version/version_test.go deleted file mode 100644 index 62a126faa..000000000 --- a/private/version/version_test.go +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (C) 2019 Storj Labs, Inc. -// See LICENSE for copying information. - -package version_test - -import ( - "encoding/json" - "math" - "math/rand" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "storj.io/common/storj" - "storj.io/storj/private/version" -) - -func TestInfo_IsZero(t *testing.T) { - zeroInfo := version.Info{} - require.True(t, zeroInfo.IsZero()) - - ver, err := version.NewSemVer("1.2.3") - require.NoError(t, err) - - info := version.Info{ - Version: ver, - } - require.False(t, info.IsZero()) -} - -func TestSemVer_IsZero(t *testing.T) { - zeroVer := version.SemVer{} - require.True(t, zeroVer.IsZero()) - - ver, err := version.NewSemVer("1.2.3") - require.NoError(t, err) - require.False(t, ver.IsZero()) -} - -func TestSemVer_Compare(t *testing.T) { - version001, err := version.NewSemVer("v0.0.1") - require.NoError(t, err) - version002, err := version.NewSemVer("v0.0.2") - require.NoError(t, err) - version030, err := version.NewSemVer("v0.3.0") - require.NoError(t, err) - version040, err := version.NewSemVer("v0.4.0") - require.NoError(t, err) - version500, err := version.NewSemVer("v5.0.0") - require.NoError(t, err) - version600, err := version.NewSemVer("v6.0.0") - require.NoError(t, err) - - // compare the same values - require.True(t, version001.Compare(version001) == 0) - require.True(t, version030.Compare(version030) == 0) - require.True(t, version500.Compare(version500) == 0) - - require.True(t, version001.Compare(version002) < 0) - require.True(t, version030.Compare(version040) < 0) - require.True(t, version500.Compare(version600) < 0) - require.True(t, version001.Compare(version030) < 0) - require.True(t, version030.Compare(version500) < 0) - - require.True(t, version002.Compare(version001) > 0) - require.True(t, version040.Compare(version030) > 0) - require.True(t, version600.Compare(version500) > 0) - require.True(t, version030.Compare(version002) > 0) - require.True(t, version600.Compare(version040) > 0) -} - -func TestRollout_MarshalJSON_UnmarshalJSON(t *testing.T) { - var arbitraryRollout version.Rollout - for i := 0; i < len(version.RolloutBytes{}); i++ { - arbitraryRollout.Seed[i] = byte(i) - arbitraryRollout.Cursor[i] = byte(i * 2) - } - - scenarios := []struct { - name string - rollout version.Rollout - }{ - { - "arbitrary rollout", - arbitraryRollout, - }, - { - "empty rollout", - version.Rollout{}, - }, - } - - for _, scenario := range scenarios { - scenario := scenario - t.Run(scenario.name, func(t *testing.T) { - var actualRollout version.Rollout - - _, err := json.Marshal(actualRollout.Seed) - require.NoError(t, err) - - jsonRollout, err := json.Marshal(scenario.rollout) - require.NoError(t, err) - - err = json.Unmarshal(jsonRollout, &actualRollout) - require.NoError(t, err) - require.Equal(t, scenario.rollout, actualRollout) - }) - } -} - -func TestShouldUpdate(t *testing.T) { - // NB: total and acceptable tolerance are negatively correlated. - total := 10000 - tolerance := total * 2 / 100 // 2% - - for p := 10; p < 100; p += 10 { - var rollouts int - percentage := p - cursor := version.PercentageToCursor(percentage) - - rollout := version.Rollout{ - Seed: version.RolloutBytes{}, - Cursor: cursor, - } - rand.Read(rollout.Seed[:]) - - for i := 0; i < total; i++ { - var nodeID storj.NodeID - _, err := rand.Read(nodeID[:]) - require.NoError(t, err) - - if version.ShouldUpdate(rollout, nodeID) { - rollouts++ - } - } - - assert.Condition(t, func() bool { - diff := rollouts - (total * percentage / 100) - return int(math.Abs(float64(diff))) < tolerance - }) - } -} diff --git a/satellite/admin.go b/satellite/admin.go index 49dabb250..c85dacd4b 100644 --- a/satellite/admin.go +++ b/satellite/admin.go @@ -17,8 +17,8 @@ import ( "storj.io/common/peertls/extensions" "storj.io/common/storj" "storj.io/private/debug" + "storj.io/private/version" "storj.io/storj/private/lifecycle" - "storj.io/storj/private/version" "storj.io/storj/private/version/checker" "storj.io/storj/satellite/admin" "storj.io/storj/satellite/metainfo" diff --git a/satellite/api.go b/satellite/api.go index 85d74f66c..3ba69cd0a 100644 --- a/satellite/api.go +++ b/satellite/api.go @@ -24,12 +24,12 @@ import ( "storj.io/common/signing" "storj.io/common/storj" "storj.io/private/debug" + "storj.io/private/version" "storj.io/storj/pkg/auth/grpcauth" "storj.io/storj/pkg/server" "storj.io/storj/private/lifecycle" "storj.io/storj/private/post" "storj.io/storj/private/post/oauth2" - "storj.io/storj/private/version" "storj.io/storj/private/version/checker" "storj.io/storj/satellite/accounting" "storj.io/storj/satellite/console" diff --git a/satellite/core.go b/satellite/core.go index 16b3f706b..5ddec3eeb 100644 --- a/satellite/core.go +++ b/satellite/core.go @@ -21,8 +21,8 @@ import ( "storj.io/common/signing" "storj.io/common/storj" "storj.io/private/debug" + "storj.io/private/version" "storj.io/storj/private/lifecycle" - "storj.io/storj/private/version" version_checker "storj.io/storj/private/version/checker" "storj.io/storj/satellite/accounting" "storj.io/storj/satellite/accounting/reportedrollup" diff --git a/satellite/gc.go b/satellite/gc.go index ea9593075..2dbcf7fb5 100644 --- a/satellite/gc.go +++ b/satellite/gc.go @@ -19,8 +19,8 @@ import ( "storj.io/common/rpc" "storj.io/common/storj" "storj.io/private/debug" + "storj.io/private/version" "storj.io/storj/private/lifecycle" - "storj.io/storj/private/version" version_checker "storj.io/storj/private/version/checker" "storj.io/storj/satellite/gc" "storj.io/storj/satellite/metainfo" diff --git a/satellite/repairer.go b/satellite/repairer.go index 5e373bbf5..fd358e6a9 100644 --- a/satellite/repairer.go +++ b/satellite/repairer.go @@ -21,8 +21,8 @@ import ( "storj.io/common/signing" "storj.io/common/storj" "storj.io/private/debug" + "storj.io/private/version" "storj.io/storj/private/lifecycle" - "storj.io/storj/private/version" version_checker "storj.io/storj/private/version/checker" "storj.io/storj/satellite/metainfo" "storj.io/storj/satellite/orders" diff --git a/satellite/satellitedb/overlaycache.go b/satellite/satellitedb/overlaycache.go index aa764b302..720a3b377 100644 --- a/satellite/satellitedb/overlaycache.go +++ b/satellite/satellitedb/overlaycache.go @@ -18,7 +18,7 @@ import ( "storj.io/common/pb" "storj.io/common/storj" - "storj.io/storj/private/version" + "storj.io/private/version" "storj.io/storj/satellite/overlay" "storj.io/storj/satellite/satellitedb/dbx" ) diff --git a/scripts/release.sh b/scripts/release.sh index 74abe7b9e..6bbf96926 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -28,7 +28,7 @@ fi echo Running "go $@" exec go "$1" -ldflags \ - "-s -w -X storj.io/storj/private/version.buildTimestamp=$TIMESTAMP - -X storj.io/storj/private/version.buildCommitHash=$COMMIT - -X storj.io/storj/private/version.buildVersion=$VERSION - -X storj.io/storj/private/version.buildRelease=$RELEASE" "${@:2}" + "-s -w -X storj.io/private/version.buildTimestamp=$TIMESTAMP + -X storj.io/private/version.buildCommitHash=$COMMIT + -X storj.io/private/version.buildVersion=$VERSION + -X storj.io/private/version.buildRelease=$RELEASE" "${@:2}" diff --git a/storagenode/console/service.go b/storagenode/console/service.go index 832879fb7..83a231b1c 100644 --- a/storagenode/console/service.go +++ b/storagenode/console/service.go @@ -13,8 +13,8 @@ import ( "storj.io/common/memory" "storj.io/common/storj" + "storj.io/private/version" "storj.io/storj/private/date" - "storj.io/storj/private/version" "storj.io/storj/private/version/checker" "storj.io/storj/storagenode/bandwidth" "storj.io/storj/storagenode/contact" diff --git a/storagenode/peer.go b/storagenode/peer.go index 9868a7ed2..5ad5b3197 100644 --- a/storagenode/peer.go +++ b/storagenode/peer.go @@ -24,9 +24,9 @@ import ( "storj.io/common/signing" "storj.io/common/storj" "storj.io/private/debug" + "storj.io/private/version" "storj.io/storj/pkg/server" "storj.io/storj/private/lifecycle" - "storj.io/storj/private/version" "storj.io/storj/private/version/checker" "storj.io/storj/satellite/overlay" "storj.io/storj/storage" diff --git a/versioncontrol/peer.go b/versioncontrol/peer.go index 3e6ce1e27..b86c1456c 100644 --- a/versioncontrol/peer.go +++ b/versioncontrol/peer.go @@ -16,7 +16,7 @@ import ( "golang.org/x/sync/errgroup" "storj.io/common/errs2" - "storj.io/storj/private/version" + "storj.io/private/version" ) // seedLength is the number of bytes in a rollout seed.