diff options
| author | Jeff Carr <[email protected]> | 2024-12-18 01:29:24 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-18 01:29:24 -0600 |
| commit | 54c70eb166a26a92bdcac3fe4eadda86543042ac (patch) | |
| tree | 0a958d49d8eae073b2cd42be149ea61f89050fba | |
| parent | 5447f9ebfebcc836721368fe62a5577e8cb75498 (diff) | |
rm old stuffv0.23.8
| -rw-r--r-- | setTargetVersion.go | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/setTargetVersion.go b/setTargetVersion.go deleted file mode 100644 index 0d53fb2..0000000 --- a/setTargetVersion.go +++ /dev/null @@ -1,73 +0,0 @@ -package main - -/* -func setTargetVersion() { - // go through and set the target versions for each repo - // todo: add sanity checking in repolist to verify these and/or autocompute them - // for now, just don't be stupid when you set your ENV vars - // widget I versioned early before I knew what the hell this would mean and can - // not be down versioned because that's not how GO versioning works. Once you - // set the version for a path, it's set in stone forever. (smart system!) - // we could rename go.wit.com/widget to go.wit.com/newwidget and restart the versioning - // system, but that's rediculous and this servers to always remind me to never make this mistake again - var count int - loop := me.repos.View.ReposSortByName() - for loop.Scan() { - repo := loop.Repo() - if repo == nil { - log.Info("initial scan repo = nil") - continue - } - - if repo.Status == nil { - log.Info("repo.status == nil", repo.Name()) - continue - } - - if repo.GoPath() == "go.wit.com/widget" { - repo.Status.SetTargetVersion("v" + os.Getenv("GUIRELEASE_WIDGET")) - } else { - prefix := "v" + os.Getenv("GUIRELEASE_VERSION") - lasttag := repo.Status.LastTag() - if strings.HasPrefix(lasttag, prefix) { - repo.Status.SetTargetVersion(lasttag) - } else { - repo.Status.SetTargetVersion(prefix) - } - } - if strings.HasPrefix(repo.GoPath(), "go.wit.com/dev/") { - lasttag := repo.Status.GetLastTagVersion() - repo.Status.SetTargetVersion(lasttag) - } - // repo.NewScan() - count += 1 - } - log.Info("target versions set for", count, "repos") -} - -// trys to figure out if the version needs to be incremented -func incrementTargetVersion() bool { - var count int - loop := me.repos.View.ReposSortByName() - for loop.Scan() { - repo := loop.Repo() - if repo.ReadOnly() { - continue - } - lasttag := repo.Status.GetLastTagVersion() - master := repo.Status.GetMasterVersion() - - if lasttag != master { - log.Info("increment target version", repo.GoPath(), lasttag, master) - count += 1 - } else { - // check go dependancies for target version changes - } - } - log.Info("need to update target versions for", count, "repos") - if count == 0 { - return true - } - return false -} -*/ |
