2024-11-27 13:57:17 -06:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package gitpb;
|
|
|
|
|
|
|
|
// stores information about git repos
|
|
|
|
// If the project is in golang, also gets the go language dependacies
|
|
|
|
|
2024-11-29 18:15:25 -06:00
|
|
|
import "gitTag.proto";
|
2024-11-29 21:51:30 -06:00
|
|
|
import "goDep.proto";
|
2024-11-27 13:57:17 -06:00
|
|
|
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
|
|
|
|
|
2024-12-01 22:23:38 -06:00
|
|
|
// global settings for autogenpb `autogenpb:mutex`
|
|
|
|
|
2024-11-29 21:51:30 -06:00
|
|
|
message Repo { // `autogenpb:marshal`
|
2024-12-16 03:04:39 -06:00
|
|
|
string fullPath = 1; // `autogenpb:unique` // the actual path to the .git directory: '/home/devel/golang.org/x/tools'
|
2024-12-03 00:35:50 -06:00
|
|
|
string masterBranchName = 3; // git 'main' or 'master' branch name
|
|
|
|
string develBranchName = 4; // whatever the git 'devel' branch name is
|
|
|
|
string userBranchName = 5; // whatever your username branch is
|
2024-12-17 06:37:14 -06:00
|
|
|
bool dirty = 6; // if git says things have been changed
|
|
|
|
string URL = 7; // the URL
|
|
|
|
GitTags tags = 8; // known tags
|
|
|
|
GitTimes times = 9; // store all the mtime values here. these are temporary
|
|
|
|
GoInfo goInfo = 10; // put all the go specifcs here
|
|
|
|
GoDeps goDeps = 11; // what is in the go.sum file
|
|
|
|
string currentBranchName = 12; // the branch currently checked out
|
|
|
|
string currentBranchVersion = 13; // the branch currently checked out
|
|
|
|
string lastTag = 14; // the oldest tag
|
|
|
|
string targetVersion = 15; // useful during the package release process
|
|
|
|
bool readOnly = 16; // tracks access to 'git push'
|
|
|
|
string desc = 17; // what is this repo?
|
|
|
|
string stateChange = 18; // reason for state change
|
|
|
|
string masterVersion = 19; // just store this for now
|
|
|
|
string develVersion = 20; //
|
|
|
|
string userVersion = 21; //
|
2024-11-27 13:57:17 -06:00
|
|
|
}
|
|
|
|
|
2024-11-29 21:51:30 -06:00
|
|
|
message Repos { // `autogenpb:marshal`
|
2024-12-01 00:49:25 -06:00
|
|
|
string uuid = 1; // `autogenpb:uuid:8daaeba1-fb1f-4762-ae6e-95a55d352673`
|
2024-11-27 13:57:17 -06:00
|
|
|
string version = 2; // maybe can be used for protobuf schema change violations
|
|
|
|
repeated Repo repos = 3;
|
|
|
|
}
|
2024-12-17 00:00:49 -06:00
|
|
|
|
|
|
|
// should it be done this way?
|
|
|
|
message GitTimes {
|
|
|
|
google.protobuf.Timestamp lastPull = 1; // last time a git pull was done
|
|
|
|
google.protobuf.Timestamp lastUpdate = 2; // when was ReloadGit() last done
|
|
|
|
google.protobuf.Timestamp lastDirty = 3; // last time CheckDirty() was run
|
|
|
|
google.protobuf.Timestamp mtimeDir = 4; // mtime for ./git // maybe useful to track
|
|
|
|
google.protobuf.Timestamp mtimeHead = 5; // mtime for ./git/HEAD // these two mtimes allow really fast checks to see if git has changed
|
|
|
|
google.protobuf.Timestamp mtimeIndex = 6; // mtime for ./git/HEAD // probably always in sync with HEAD
|
|
|
|
google.protobuf.Timestamp mtimeFetch = 7; // mtime for ./git/FETCH_HEAD // last time 'git fetch' or 'git pull' was run on current branch?
|
2024-12-17 06:37:14 -06:00
|
|
|
google.protobuf.Timestamp lastGoDep = 8; // mtime for last go.sum scan
|
2024-12-27 04:55:57 -06:00
|
|
|
google.protobuf.Timestamp newestCommit = 9; // when the newest commit was
|
2024-12-17 00:00:49 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
// this is probably better. think about moving to this instead
|
|
|
|
message GoInfo {
|
|
|
|
string goPath = 1; // the logical path as used by golang: 'go.wit.com/apps/helloworld'
|
|
|
|
string desc = 2; // what is this repo?
|
|
|
|
bool goLibrary = 3; // is this a golang library?
|
|
|
|
bool goBinary = 4; // is this a golang binary?
|
|
|
|
bool goPrimitive = 5; // if this is a golang primitive (only has go.mod)
|
|
|
|
bool goPlugin = 6; // is this a golang plugin?
|
|
|
|
bool goProtobuf = 7; // autogen go files from .proto
|
|
|
|
GoDeps goDeps = 8; // what is in the go.sum file
|
|
|
|
GoDeps published = 9; // the last published go.mod/go.sum
|
|
|
|
bytes goMod = 10; // the last go.mod file
|
|
|
|
bytes goSum = 11; // the last go.sum file
|
2024-12-17 01:15:31 -06:00
|
|
|
bool gitIgnoresGoSum = 12; // does .gitignore ignore go.mod & go.sum?
|
2024-12-17 00:00:49 -06:00
|
|
|
}
|