diff options
| author | Jeff Carr <[email protected]> | 2024-12-17 00:00:49 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-17 00:00:49 -0600 |
| commit | c53da5a9a1da1b29db24d4e1ce2b294514d99ac2 (patch) | |
| tree | c39b33f43d5be87313b3c0aa0c7bb7c58b2f72b6 /reload.go | |
| parent | a115ba144b00dc0339a8cf7eae6bdf2aab5fb4b5 (diff) | |
smarter and faster mtime logic
Diffstat (limited to 'reload.go')
| -rw-r--r-- | reload.go | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/reload.go b/reload.go new file mode 100644 index 0000000..7a8c212 --- /dev/null +++ b/reload.go @@ -0,0 +1,39 @@ +package gitpb + +func (repo *Repo) Reload() error { + repo.Tags = new(GitTags) + repo.UpdateGitTags() + repo.GoDeps = new(GoDeps) + repo.ParseGoSum() + + if repo.GoInfo != nil { + repo.ReloadGo() + } + return nil +} + +func (repo *Repo) ReloadGo() error { + repo.GoPlugin = false + repo.GoProtobuf = false + repo.GoLibrary = false + repo.GoBinary = false + switch repo.goListRepoType() { + case "plugin": + repo.GoPlugin = true + case "protobuf": + repo.GoProtobuf = true + case "library": + repo.GoLibrary = true + case "binary": + repo.GoBinary = true + } + return nil +} + +func (repo *Repo) SetDevelBranchName(bname string) { + repo.DevelBranchName = bname +} + +func (repo *Repo) SetUserBranchName(bname string) { + repo.UserBranchName = bname +} |
