diff --git a/Makefile b/Makefile index d7ba526..d796cbd 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ # go install -all: goimports forgeConfig.pb.go uuid.pb.go patch.pb.go vet +all: forgeConfig.pb.go uuid.pb.go patch.pb.go goimports vet generate: clean go-mod-clean diff --git a/forgeConfig.proto b/forgeConfig.proto index 77c559e..e96001d 100644 --- a/forgeConfig.proto +++ b/forgeConfig.proto @@ -13,7 +13,7 @@ import "google/protobuf/timestamp.proto"; // Import the well-known type for Time // for example 'zookeeper' is packaged as 'zookeeper-go' // due to the prior apache foundation project. This happens and is ok! message ForgeConfig { - string goPath = 1; // `autogenpb:unique` // Examples: 'go.wit.com/apps/go-clone' or "~/mythings" or "/home/src/foo" + string goPath = 1; // `autogenpb:unique` `autogenpb:sort` // Examples: 'go.wit.com/apps/go-clone' or "~/mythings" or "/home/src/foo" bool writable = 2; // if you have write access to the repo bool readOnly = 3; // the opposite, but needed for now because I don't know what I'm doing diff --git a/patch.proto b/patch.proto index 0c5fd62..5942924 100644 --- a/patch.proto +++ b/patch.proto @@ -5,7 +5,7 @@ package forgepb; import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp message Patch { - string filename = 1; // `autogenpb:unique` + string filename = 1; // `autogenpb:unique` `autogenpb:sort` bytes data = 2; // string repoPath = 3; // path to the git repo string branchName = 4; // diff --git a/patchset.proto b/patchset.proto deleted file mode 100644 index afb725a..0000000 --- a/patchset.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; - -package forgepb; - -import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp - -message Patch { - string filename = 1; // `autogenpb:unique` - bytes data = 2; // - string repoPath = 3; // path to the git repo - string branchName = 4; // - string branchHash = 5; // - google.protobuf.Timestamp ctime = 7; // the git commit timestamp of this patch - string commitHash = 8; // the git commit hash of this patch - string startHash = 9; // the start commit hash - repeated string Files = 10; // the filenames this patch changes -} - -message Patchset { // `autogenpb:marshal` - repeated Patch Patches = 1; - string name = 2; // - string comment = 3; // - string gitAuthorName = 4; // - string gitAuthorEmail = 5; // - google.protobuf.Timestamp ctime = 6; // create time of this patchset - string tmpDir = 7; // temp dir - string startBranchName = 8; // - string endBranchName = 9; // - string startBranchHash = 10; // - string endBranchHash = 11; // -} - -message Patchsets { // `autogenpb:marshal` - string uuid = 1; // `autogenpb:uuid:be926ad9-f07f-484c-adf2-d96eeabf3079` // todo: add autogenpb support for this - string version = 2; // could be used for protobuf schema change violations? - repeated Patchset Patchsets = 3; -} diff --git a/uuid.proto b/uuid.proto index e58ca12..64e4dfe 100644 --- a/uuid.proto +++ b/uuid.proto @@ -4,7 +4,13 @@ syntax = "proto3"; package forgepb; // autogenpb:no-sort -message UuidConfigs { // `autogenpb:marshal` - string uuid = 1; // could be useful for /usr/share/file/magic someday? - string version = 2; // could be used for protobuf schema change violations? +message Uuid { // `autogenpb:marshal` + string name = 1; +} + +// autogenpb:no-sort +message Uuids { + string uuid = 1; // `autogenpb:uuid` + string version = 2; // `autogenpb:version` + repeated Uuid Uuids = 3; }