cmd: update cmd version (#1040)

* update cmd version

* update app info
pull/1044/head
Tony Chen 3 years ago committed by GitHub
parent 2729caeecf
commit 99719dd667
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      app.go
  2. 2
      cmd/kratos/main.go
  3. 3
      cmd/protoc-gen-go-errors/main.go
  4. 2
      cmd/protoc-gen-go-http/http.go
  5. 2
      cmd/protoc-gen-go-http/main.go
  6. 6
      cmd/protoc-gen-go-http/version.go
  7. 6
      context.go

@ -59,9 +59,11 @@ func (a *App) Run() error {
return err
}
ctx := NewContext(a.ctx, AppInfo{
ID: a.opts.id,
Name: a.opts.name,
Version: a.opts.version,
ID: instance.ID,
Name: instance.Name,
Version: instance.Version,
Metadata: instance.Metadata,
Endpoints: instance.Endpoints,
})
eg, ctx := errgroup.WithContext(ctx)
wg := sync.WaitGroup{}

@ -11,7 +11,7 @@ import (
)
var (
version string = "v2.0.0-rc1"
version string = "v2.0.0-rc3"
rootCmd = &cobra.Command{
Use: "kratos",

@ -3,11 +3,12 @@ package main
import (
"flag"
"fmt"
"google.golang.org/protobuf/compiler/protogen"
"google.golang.org/protobuf/types/pluginpb"
)
const version = "v2.0.0-rc1"
const version = "v2.0.0-rc3"
func main() {
showVersion := flag.Bool("version", false, "print the version and exit")

@ -28,7 +28,7 @@ func generateFile(gen *protogen.Plugin, file *protogen.File) *protogen.Generated
g := gen.NewGeneratedFile(filename, file.GoImportPath)
g.P("// Code generated by protoc-gen-go-http. DO NOT EDIT.")
g.P("// versions:")
g.P(fmt.Sprintf("// protoc-gen-go-http %s", Version))
g.P(fmt.Sprintf("// protoc-gen-go-http %s", version))
g.P()
g.P("package ", file.GoPackageName)
g.P()

@ -8,7 +8,7 @@ import (
"google.golang.org/protobuf/types/pluginpb"
)
const version = "v2.0.0-rc1"
const version = "v2.0.0-rc3"
func main() {
showVersion := flag.Bool("version", false, "print the version and exit")

@ -1,6 +0,0 @@
package main
const (
// Version is protoc-gen-go-http version
Version = "v2.0.0-rc3"
)

@ -1,12 +1,16 @@
package kratos
import "context"
import (
"context"
)
// AppInfo is application context value.
type AppInfo struct {
ID string
Name string
Version string
Metadata map[string]string
Endpoints []string
}
type appKey struct{}

Loading…
Cancel
Save