diff options
| author | Jeff Carr <[email protected]> | 2025-02-15 05:34:12 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-15 05:34:12 -0600 |
| commit | 010791e82809c068a6a70a103d96596450eefc42 (patch) | |
| tree | 54e69e1e3c1a4231835b20a034ec0e59ec203e3a /currentVersions.go | |
| parent | 312c4742b6aaa0018ca43e9ec612d35d031d5269 (diff) | |
actually use the damn information I already put in a protobufv0.0.78
Diffstat (limited to 'currentVersions.go')
| -rw-r--r-- | currentVersions.go | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/currentVersions.go b/currentVersions.go index 6e9454f..495d1ec 100644 --- a/currentVersions.go +++ b/currentVersions.go @@ -162,66 +162,6 @@ func (repo *Repo) gitVersionByName(name string) (string, error) { return strings.TrimSpace(output), nil } -// find a branch name -// will find "master" or "devel" -// will also find "v0.1.1" -// or will find "patches-from-foo" -// will return *any* match on any git branch because it doesn't -// matter much here yet -// eventually this will be worked out by forge in some future code that hasn't been made yet -func (repo *Repo) IsBranch(findname string) bool { - loop := repo.Tags.All() - for loop.Scan() { - t := loop.Next() - // log.Info("LocalTagExists() tag:", t.Refname) - - tagname := t.Refname - if strings.HasPrefix(tagname, "refs/remotes") { - continue - } - path, filename := filepath.Split(tagname) - log.Log(INFO, "gitpb.IsBranch() tag:", path, filename, "from", repo.GetGoPath()) - if filename == findname { - log.Log(INFO, "gitpb.IsBranch() found tag:", path, filename, "from", repo.GetGoPath()) - return true - } - } - log.Log(INFO, "did not find tag:", findname, "in", repo.GetGoPath()) - return false -} - -// todo: redo this and above. both are messed up. ignore for now until things are stable -func (repo *Repo) IsLocalBranch(findname string) bool { - loop := repo.Tags.All() - for loop.Scan() { - t := loop.Next() - // log.Info("LocalTagExists() tag:", t.Refname) - - tagname := t.Refname - if strings.HasPrefix(tagname, "refs/heads") { - continue - } - path, filename := filepath.Split(tagname) - log.Log(INFO, "gitpb.IsBranch() tag:", path, filename, "from", repo.GetGoPath()) - if filename == findname { - log.Log(INFO, "gitpb.IsBranch() found tag:", path, filename, "from", repo.GetGoPath()) - return true - } - } - log.Log(INFO, "did not find tag:", findname, "in", repo.GetGoPath()) - return false -} - -// todo: redo this and above. both are messed up. ignore for now until things are stable -func (repo *Repo) IsDevelRemote() bool { - bname := repo.GetDevelBranchName() - rpath := filepath.Join("refs/remotes/origin", bname) - if repo.Exists(rpath) { - return true - } - return false -} - func trimNonNumericFromStart(s string) string { for i, r := range s { if unicode.IsDigit(r) { |
