summaryrefslogtreecommitdiff
path: root/reload.go
diff options
context:
space:
mode:
Diffstat (limited to 'reload.go')
-rw-r--r--reload.go39
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
+}