Преглед на файлове

Change cmdline into git hash of the project

Vadim Markovtsev преди 7 години
родител
ревизия
81ccc42ca2
променени са 5 файла, в които са добавени 66 реда и са изтрити 63 реда
  1. 2 2
      cmd/hercules/main.go
  2. 56 56
      pb/pb.pb.go
  3. 2 2
      pb/pb.proto
  4. 3 3
      pipeline.go
  5. 3 0
      version.go

+ 2 - 2
cmd/hercules/main.go

@@ -229,7 +229,7 @@ func printResults(
 	results map[hercules.PipelineItem]interface{}) {
 	fmt.Println("hercules:")
 	fmt.Println("  version: 3")
-	fmt.Println("  cmdline:", strings.Join(os.Args, " "))
+	fmt.Println("  hash:", hercules.GIT_HASH)
 	fmt.Println("  repository:", uri)
 	fmt.Println("  begin_unix_time:", begin)
 	fmt.Println("  end_unix_time:", end)
@@ -251,7 +251,7 @@ func protobufResults(
 
   header := pb.Metadata{
 	  Version: 1,
-	  Cmdline: strings.Join(os.Args, " "),
+	  Hash: hercules.GIT_HASH,
 	  Repository: uri,
     BeginUnixTime: begin,
 	  EndUnixTime: end,

+ 56 - 56
pb/pb.pb.go

@@ -41,8 +41,8 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
 type Metadata struct {
 	// this format is versioned
 	Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
-	// complete command line used to write this message
-	Cmdline string `protobuf:"bytes,2,opt,name=cmdline,proto3" json:"cmdline,omitempty"`
+	// git hash of the revision from which Hercules is built
+	Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
 	// repository's name
 	Repository string `protobuf:"bytes,3,opt,name=repository,proto3" json:"repository,omitempty"`
 	// timestamp of the first analysed commit
@@ -65,9 +65,9 @@ func (m *Metadata) GetVersion() int32 {
 	return 0
 }
 
-func (m *Metadata) GetCmdline() string {
+func (m *Metadata) GetHash() string {
 	if m != nil {
-		return m.Cmdline
+		return m.Hash
 	}
 	return ""
 }
@@ -468,56 +468,56 @@ func init() {
 func init() { proto.RegisterFile("pb/pb.proto", fileDescriptorPb) }
 
 var fileDescriptorPb = []byte{
-	// 806 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4d, 0x6f, 0xdb, 0x46,
-	0x10, 0x05, 0x4d, 0x49, 0x96, 0x86, 0x52, 0x1d, 0x2f, 0x12, 0x87, 0x75, 0x91, 0x54, 0x25, 0xd2,
-	0x42, 0x68, 0x1a, 0x06, 0x50, 0x50, 0xa0, 0x48, 0x2e, 0x75, 0xd4, 0x06, 0xc8, 0x21, 0x2d, 0xb0,
-	0x76, 0xce, 0xc2, 0x8a, 0x5c, 0xd9, 0xdb, 0x92, 0xbb, 0xc4, 0xee, 0xd2, 0xb2, 0x7e, 0x50, 0x2f,
-	0x05, 0x8a, 0x1e, 0x7a, 0xea, 0xbd, 0x3f, 0xac, 0xd8, 0x2f, 0x49, 0x31, 0xe4, 0x20, 0x37, 0xbe,
-	0x99, 0xf7, 0x86, 0x6f, 0x66, 0x96, 0x4b, 0x48, 0x9a, 0xc5, 0xf3, 0x66, 0x91, 0x37, 0x52, 0x68,
-	0x91, 0xfd, 0x17, 0x41, 0xff, 0x1d, 0xd5, 0xa4, 0x24, 0x9a, 0xa0, 0x14, 0x0e, 0xaf, 0xa9, 0x54,
-	0x4c, 0xf0, 0x34, 0x1a, 0x47, 0x93, 0x2e, 0x0e, 0xd0, 0x64, 0x8a, 0xba, 0xac, 0x18, 0xa7, 0xe9,
-	0xc1, 0x38, 0x9a, 0x0c, 0x70, 0x80, 0xe8, 0x31, 0x80, 0xa4, 0x8d, 0x50, 0x4c, 0x0b, 0xb9, 0x4e,
-	0x63, 0x9b, 0xdc, 0x89, 0xa0, 0x6f, 0xe0, 0x68, 0x41, 0x2f, 0x19, 0x9f, 0xb7, 0x9c, 0xdd, 0xcc,
-	0x35, 0xab, 0x69, 0xda, 0x19, 0x47, 0x93, 0x18, 0x8f, 0x6c, 0xf8, 0x3d, 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 0xf6, 0x7a, 0xbe, 0x82, 0xde, 0x15, 0x25,
-	0x25, 0x95, 0xb6, 0xd7, 0x64, 0x3a, 0xc8, 0xc3, 0xbf, 0x01, 0xfb, 0x04, 0x7a, 0x09, 0xfd, 0x42,
-	0x70, 0x4d, 0xb9, 0x36, 0x1f, 0x82, 0x29, 0xff, 0x38, 0xbf, 0x55, 0x26, 0x9f, 0x79, 0xc2, 0xcf,
-	0x5c, 0xcb, 0x35, 0xde, 0xf0, 0x4f, 0x5f, 0xc1, 0xe8, 0x83, 0x14, 0xba, 0x07, 0xf1, 0xef, 0x74,
-	0xed, 0x07, 0x6b, 0x1e, 0xcd, 0xc9, 0xbc, 0x26, 0x55, 0xeb, 0xc6, 0x39, 0xc4, 0x0e, 0xbc, 0x3c,
-	0xf8, 0x21, 0x5a, 0xf4, 0xec, 0x0f, 0xeb, 0xc5, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x29,
-	0x26, 0x6c, 0xbf, 0x06, 0x00, 0x00,
+	// 805 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4d, 0x8f, 0xdb, 0x36,
+	0x10, 0x85, 0x56, 0xfe, 0x1c, 0xd9, 0xdd, 0x2c, 0x91, 0x6c, 0xd4, 0x2d, 0x92, 0xba, 0x42, 0x5a,
+	0x18, 0x4d, 0xa3, 0x00, 0x0e, 0x0a, 0x14, 0xc9, 0xa5, 0x1b, 0xb7, 0x01, 0x72, 0x48, 0x0b, 0x70,
+	0x37, 0x67, 0x81, 0x96, 0xe8, 0x35, 0x5b, 0x89, 0x14, 0x48, 0x6a, 0xbd, 0xfe, 0x41, 0xbd, 0x14,
+	0x28, 0x7a, 0xe8, 0xa9, 0x97, 0xfe, 0xb6, 0x82, 0x1f, 0xb2, 0x9d, 0x85, 0x37, 0xc8, 0x8d, 0x6f,
+	0xe6, 0x3d, 0xea, 0xcd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00, 0x00,
 }

+ 2 - 2
pb/pb.proto

@@ -3,8 +3,8 @@ syntax = "proto3";
 message Metadata {
     // this format is versioned
     int32 version = 1;
-    // complete command line used to write this message
-    string cmdline = 2;
+    // git hash of the revision from which Hercules is built
+    string hash = 2;
     // repository's name
     string repository = 3;
     // timestamp of the first analysed commit

+ 3 - 3
pipeline.go

@@ -217,14 +217,14 @@ type Pipeline struct {
 	// second is the total number of commits.
 	OnProgress func(int, int)
 
-	// repository points to the analysed Git repository struct from go-git.
+	// Repository points to the analysed Git repository struct from go-git.
 	repository *git.Repository
 
-	// items are the registered building blocks in the pipeline. The order defines the
+	// Items are the registered building blocks in the pipeline. The order defines the
 	// execution sequence.
 	items []PipelineItem
 
-	// the collection of parameters to create items.
+	// The collection of parameters to create items.
 	facts map[string]interface{}
 
 	// Feature flags which enable the corresponding items.

+ 3 - 0
version.go

@@ -0,0 +1,3 @@
+package hercules
+
+var GIT_HASH = "<unknown>"