add some fields to track the build information

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-06-05 01:33:59 -07:00
parent 295789efed
commit b4bedf8c9c
2 changed files with 85 additions and 34 deletions

View File

@ -21,22 +21,28 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type Config struct { type Config struct {
USER string `protobuf:"bytes,1,opt,name=USER,proto3" json:"USER,omitempty"` USER string `protobuf:"bytes,1,opt,name=USER,proto3" json:"USER,omitempty"`
Width int32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"` Width int32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"`
Height int32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` Height int32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
Hostname string `protobuf:"bytes,4,opt,name=hostname,proto3" json:"hostname,omitempty"` Hostname string `protobuf:"bytes,4,opt,name=hostname,proto3" json:"hostname,omitempty"`
Debug bool `protobuf:"varint,5,opt,name=debug,proto3" json:"debug,omitempty"` Debug bool `protobuf:"varint,5,opt,name=debug,proto3" json:"debug,omitempty"`
Debugtable bool `protobuf:"varint,6,opt,name=debugtable,proto3" json:"debugtable,omitempty"` Debugtable bool `protobuf:"varint,6,opt,name=debugtable,proto3" json:"debugtable,omitempty"`
Filename string `protobuf:"bytes,7,opt,name=filename,proto3" json:"filename,omitempty"` Filename string `protobuf:"bytes,7,opt,name=filename,proto3" json:"filename,omitempty"`
Accounts []*Account `protobuf:"bytes,8,rep,name=accounts,proto3" json:"accounts,omitempty"` Accounts []*Account `protobuf:"bytes,8,rep,name=accounts,proto3" json:"accounts,omitempty"`
Counter int32 `protobuf:"varint,9,opt,name=counter,proto3" json:"counter,omitempty"` Counter int32 `protobuf:"varint,9,opt,name=counter,proto3" json:"counter,omitempty"`
Errors int32 `protobuf:"varint,10,opt,name=errors,proto3" json:"errors,omitempty"` Errors int32 `protobuf:"varint,10,opt,name=errors,proto3" json:"errors,omitempty"`
Crashes int32 `protobuf:"varint,11,opt,name=crashes,proto3" json:"crashes,omitempty"` Crashes int32 `protobuf:"varint,11,opt,name=crashes,proto3" json:"crashes,omitempty"`
Crash string `protobuf:"bytes,12,opt,name=crash,proto3" json:"crash,omitempty"` Crash string `protobuf:"bytes,12,opt,name=crash,proto3" json:"crash,omitempty"`
IPv6 string `protobuf:"bytes,13,opt,name=IPv6,proto3" json:"IPv6,omitempty"` IPv6 string `protobuf:"bytes,13,opt,name=IPv6,proto3" json:"IPv6,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` // variables relating to the build
XXX_unrecognized []byte `json:"-"` Dirty bool `protobuf:"varint,14,opt,name=dirty,proto3" json:"dirty,omitempty"`
XXX_sizecache int32 `json:"-"` Gitref string `protobuf:"bytes,15,opt,name=gitref,proto3" json:"gitref,omitempty"`
Version string `protobuf:"bytes,16,opt,name=version,proto3" json:"version,omitempty"`
Buildtime string `protobuf:"bytes,17,opt,name=buildtime,proto3" json:"buildtime,omitempty"`
Goversion string `protobuf:"bytes,18,opt,name=goversion,proto3" json:"goversion,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *Config) Reset() { *m = Config{} } func (m *Config) Reset() { *m = Config{} }
@ -155,6 +161,41 @@ func (m *Config) GetIPv6() string {
return "" return ""
} }
func (m *Config) GetDirty() bool {
if m != nil {
return m.Dirty
}
return false
}
func (m *Config) GetGitref() string {
if m != nil {
return m.Gitref
}
return ""
}
func (m *Config) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *Config) GetBuildtime() string {
if m != nil {
return m.Buildtime
}
return ""
}
func (m *Config) GetGoversion() string {
if m != nil {
return m.Goversion
}
return ""
}
func init() { func init() {
proto.RegisterType((*Config)(nil), "witProtobuf.Config") proto.RegisterType((*Config)(nil), "witProtobuf.Config")
} }
@ -162,22 +203,25 @@ func init() {
func init() { proto.RegisterFile("config.proto", fileDescriptor_3eaf2c85e69e9ea4) } func init() { proto.RegisterFile("config.proto", fileDescriptor_3eaf2c85e69e9ea4) }
var fileDescriptor_3eaf2c85e69e9ea4 = []byte{ var fileDescriptor_3eaf2c85e69e9ea4 = []byte{
// 261 bytes of a gzipped FileDescriptorProto // 317 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0x4d, 0x6a, 0xc3, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0x4d, 0x6a, 0xc3, 0x30,
0x10, 0x85, 0x71, 0x7e, 0x1c, 0x67, 0x9c, 0x6c, 0x44, 0x28, 0x43, 0x16, 0xc5, 0x74, 0xe5, 0x95, 0x10, 0x85, 0x71, 0x93, 0x38, 0xce, 0x38, 0xe9, 0x8f, 0x08, 0x65, 0x08, 0xa5, 0x98, 0xae, 0xbc,
0x29, 0x2d, 0x74, 0x5f, 0x4a, 0x17, 0xdd, 0x05, 0x95, 0x1e, 0xc0, 0x76, 0x64, 0x4b, 0x90, 0x5a, 0x32, 0xa5, 0x85, 0xee, 0x4b, 0xe9, 0xa2, 0xbb, 0xe0, 0xd2, 0x03, 0xf8, 0x47, 0xb6, 0x05, 0x8e,
0x45, 0x92, 0x9b, 0xeb, 0xf6, 0x28, 0x45, 0x33, 0x4e, 0xc8, 0xee, 0x7d, 0xf3, 0xf3, 0x98, 0x37, 0x55, 0x24, 0x39, 0xa1, 0xf7, 0xed, 0x41, 0x8a, 0x46, 0xb6, 0x9b, 0xdd, 0xfb, 0xe6, 0xcd, 0x8c,
0xb0, 0x69, 0xed, 0xd0, 0x99, 0xbe, 0xfa, 0x71, 0x36, 0x58, 0x91, 0x9f, 0x4d, 0x38, 0x44, 0xd5, 0xf4, 0x24, 0x58, 0x17, 0x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0x13, 0x6b, 0x61, 0x14, 0xaf, 0xf0, 0x8a, 0x7a, 0x07, 0xb2, 0x27, 0x1e, 0xb9, 0xd2, 0x42,
0x76, 0x78, 0x4d, 0xc6, 0x88, 0xec, 0x0e, 0x56, 0x79, 0x2f, 0xda, 0xd2, 0x88, 0x03, 0xc7, 0x1b,
0xf2, 0xfe, 0x0b, 0xd6, 0xad, 0xe5, 0x38, 0xc9, 0x9c, 0x3b, 0x15, 0x72, 0x9f, 0x7e, 0xfb, 0xf9,
0x2f, 0x00, 0x00, 0xff, 0xff, 0x94, 0x45, 0x71, 0x71, 0x19, 0x02, 0x00, 0x00,
} }

View File

@ -17,4 +17,11 @@ message Config {
int32 crashes = 11; int32 crashes = 11;
string crash = 12; string crash = 12;
string IPv6 = 13; string IPv6 = 13;
// variables relating to the build
bool dirty = 14; // if the build was 'dirty'
string gitref = 15; // git rev-list -1 HEAD
string version = 16; // the VERSION file
string buildtime = 17; // the build time
string goversion = 18; // the version of go used to build
} }