diff options
| -rw-r--r-- | go.mod | 1 | ||||
| -rw-r--r-- | go.sum | 2 | ||||
| -rw-r--r-- | tools.go | 9 | ||||
| -rw-r--r-- | tools_install.go | 22 | ||||
| -rw-r--r-- | version/ko/main.go | 6 |
5 files changed, 37 insertions, 3 deletions
@@ -59,6 +59,7 @@ require ( github.com/peterh/liner v1.1.0 github.com/pkg/errors v0.8.0 github.com/pkg/sftp v1.8.3 // indirect + github.com/russross/blackfriday-tool v0.0.0-20120308051103-a78eb387e806 // indirect github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect github.com/streamrail/concurrent-map v0.0.0-20160823150647-8bf1e9bacbf6 github.com/tent/http-link-go v0.0.0-20130702225549-ac974c61c2f9 // indirect @@ -167,6 +167,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday v1.5.1 h1:B8ZN6pD4PVofmlDCDUdELeYrbsVIDM/bpjW3v3zgcRc= github.com/russross/blackfriday v1.5.1/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday-tool v0.0.0-20120308051103-a78eb387e806 h1:eehmvKp7Y/oJnZLyFrC+NFtDb5aMVW25QHzXjs+egWE= +github.com/russross/blackfriday-tool v0.0.0-20120308051103-a78eb387e806/go.mod h1:Dn/w91XVDVHljHfa908Dn3l6S8XF0zRm67IbS87oFRI= github.com/sendgrid/rest v2.4.1+incompatible h1:HDib/5xzQREPq34lN3YMhQtMkdXxS/qLp5G3k9a5++4= github.com/sendgrid/rest v2.4.1+incompatible/go.mod h1:kXX7q3jZtJXK5c5qK83bSGMdV6tsOE70KbHoqJls4lE= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= diff --git a/tools.go b/tools.go new file mode 100644 index 0000000..23b32c6 --- /dev/null +++ b/tools.go @@ -0,0 +1,9 @@ +// +build tools + +package main + +import ( + _ "github.com/russross/blackfriday-tool" +) + +func main() {} diff --git a/tools_install.go b/tools_install.go new file mode 100644 index 0000000..178f104 --- /dev/null +++ b/tools_install.go @@ -0,0 +1,22 @@ +// +build ignore + +package main + +import ( + "context" + "os" + "time" + + "github.com/Xe/x/internal/yeet" +) + +func main() { + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) + defer cancel() + + env := append(os.Environ(), []string{"GO111MODULE=on"}...) + + for _, tool := range []string{"github.com/russross/blackfriday-tool"} { + yeet.ShouldWork(ctx, env, yeet.WD, "go", "install", tool) + } +} diff --git a/version/ko/main.go b/version/ko/main.go index 584ae4d..3b333c8 100644 --- a/version/ko/main.go +++ b/version/ko/main.go @@ -13,10 +13,10 @@ func main() { ver := os.Getenv("GO_VERSION") if ver == "" { - log.Printf("ko: No GO_VERSION specified (wanted GO_VERSION=%[1]s) specified, assuming %[1]s", runtime.Version()) + ver = runtime.Version() + } else { + ver = "go" + ver } - ver = "go" + ver - version.Run(ver) } |
