Modify forked godep to have custom version

This commit is contained in:
Christoph Blecker 2018-11-06 12:23:23 -08:00
parent db89546591
commit 9d241ec454
No known key found for this signature in database
GPG Key ID: B34A59A9D39F838B
2 changed files with 3 additions and 3 deletions

View File

@ -173,7 +173,7 @@ func (g *Godeps) save() (int64, error) {
} }
func (g *Godeps) writeTo(w io.Writer) (int64, error) { func (g *Godeps) writeTo(w io.Writer) (int64, error) {
g.GodepVersion = fmt.Sprintf("v%d", version) // godep always writes its current version. g.GodepVersion = fmt.Sprintf("v%s", version) // godep always writes its current version.
b, err := json.MarshalIndent(g, "", "\t") b, err := json.MarshalIndent(g, "", "\t")
if err != nil { if err != nil {
return 0, err return 0, err

View File

@ -8,7 +8,7 @@ import (
"strings" "strings"
) )
const version = 80 const version = "80-k8s-r1"
var cmdVersion = &Command{ var cmdVersion = &Command{
Name: "version", Name: "version",
@ -21,7 +21,7 @@ Displays the version of godep as well as the target OS, architecture and go runt
} }
func versionString() string { func versionString() string {
return fmt.Sprintf("godep v%d (%s/%s/%s)", version, runtime.GOOS, runtime.GOARCH, runtime.Version()) return fmt.Sprintf("godep v%s (%s/%s/%s)", version, runtime.GOOS, runtime.GOARCH, runtime.Version())
} }
func runVersion(cmd *Command, args []string) { func runVersion(cmd *Command, args []string) {