generates the go.wit.com file easily

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-11-05 04:46:59 -06:00
parent e9a24fe0db
commit c79cdb3007
4 changed files with 84 additions and 11 deletions

View File

@ -14,10 +14,11 @@ stderr: build
echo "writing to /tmp/guireleaser.stderr"
./guireleaser >/tmp/guireleaser.stderr 2>&1
do-release:
make curl-release-list
prepare-release:
make curl-list-release-notdone
make curl-incrementAllTargetVersions
make curl-release-list
make curl-list-release-notdone
make curl-whitelist-stuff
make curl-findNext
make curl-showNext
@ -52,8 +53,12 @@ curl-help:
curl-tempWin:
curl --silent http://localhost:9419/tempWin
curl-whitelist-gogit2:
curl-rescan-All:
curl --silent http://localhost:9419/rescanAll
curl-whitelist-stuff:
curl --silent http://localhost:9419/whitelist?repo=go.wit.com/dev/test/gogit2
curl --silent http://localhost:9419/whitelist?repo=git.wit.org/jcarr/clone-gitea
curl-setBranchesToMasterB:
curl --silent http://localhost:9419/setBranchesToMasterB
@ -65,7 +70,9 @@ curl-findNext:
curl-showNext:
curl --silent http://localhost:9419/showNext
curl-doRelease:
doRelease:
make curl-showNext
sleep 10
curl --silent http://localhost:9419/doRelease
curl-setTargetVersion-virtigo-v0.1.1:
@ -81,11 +88,11 @@ curl-incrementAllTargetVersions:
# curl --silent http://localhost:9419/IncrementRevisonVersion?repo=go.wit.com/toolkit/debian
# report on the release
curl-release-list:
curl-list-release-notdone:
curl --silent http://localhost:9419/releaseList?readonly=true
curl-release-list-real:
curl --silent http://localhost:9419/releaseList?readonly=true?perfect=false
#curl-list-release-real:
# curl --silent http://localhost:9419/releaseList?readonly=true?perfect=false
#curl-doSingleRepo:
# curl --silent 'http://localhost:9419/doSingleRepo?repo=go.wit.com/gui&dryrun=false'
@ -95,5 +102,9 @@ curl-list-changed:
curl --silent http://localhost:9419/list?perfect=false
# include repos that you probably can't git push commits
curl-everything-list:
curl-list-everything:
curl --silent http://localhost:9419/list?readonly=true
curl-file-for-go.wit.com:
curl --silent http://localhost:9419/goweblist?readonly=true
curl --silent http://localhost:9419/goweblist?readonly=true |sort > ~/go.wit.com.versions

View File

@ -45,6 +45,10 @@ func doRelease() bool {
} else {
all = append(all, []string{"git", "add", "-f", "go.sum"})
}
if me.current.Status.IsProtobuf() {
log.Info("\tshould add protobuf files here!")
//all = append(all, []string{"git", "add", "-f", "go.sum"})
}
all = append(all, []string{"git", "commit", "-m", me.releaseReasonS})
all = append(all, []string{"git", "push"})
all = append(all, []string{"git", "tag", "-m", me.releaseReasonS, me.release.version.String()})

59
http.go
View File

@ -6,6 +6,7 @@ import (
"os"
"strings"
"go.wit.com/lib/gui/repolist"
"go.wit.com/log"
)
@ -82,6 +83,8 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
msg(w, me.current.StandardHeader())
msg(w, me.current.StandardReleaseHeader())
case "/rescanAll":
me.repos.View.ScanRepositories()
case "/setCurrentRepo":
msg(w, "repo: "+repoName)
@ -158,16 +161,39 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
if checkValidGoSum(me.current) {
msg(w, "checkValidGoSum() == true")
} else {
msg(w, "checkValidGoSum() == false")
msg(w, "checkValidGoSum() == false SHOULD NOT RELEASE THIS")
}
if me.current.Status.IsReleased() {
msg(w, "IsReleased() == true")
msg(w, "IsReleased() == true SHOULD NOT RELEASE THIS")
} else {
msg(w, "IsReleased() == false")
}
if me.current.Status.CheckDirty() {
msg(w, "CheckDirty() == true. SHOULD NOT RELEASE THIS")
} else {
msg(w, "CheckDirty() == false")
}
if me.current.Status.IsPrimitive() {
msg(w, "IsPrimitive() == true")
} else {
msg(w, "IsPrimitive() == false")
}
if me.current.Status.IsProtobuf() {
msg(w, "IsProtobuf() == true")
} else {
msg(w, "IsProtobuf() == false")
}
if me.current.Status.Whitelist {
msg(w, "Whitelist == true SHOULD NOT RELEASE THIS")
} else {
msg(w, "Whitelist == false")
}
msg(w, "")
msg(w, repolist.ReportHeader())
msg(w, me.current.StandardHeader())
msg(w, "")
msg(w, repolist.ReleaseReportHeader())
msg(w, me.current.StandardReleaseHeader())
case "/list":
me.repos.View.PrintReport(w, readonly, onlydirty, perfect)
@ -176,6 +202,35 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
case "/quit":
msg(w, "Got URL /quit")
os.Exit(0)
case "/goweblist":
loop := me.repos.View.ReposAll()
for loop.Scan() {
repo := loop.Repo()
lastTag := repo.LastTag()
tag := repo.Status.NewestTag()
gitAge, err := tag.GetDate()
if err != nil {
msg(w, fmt.Sprintf("tag date error", repo.Name()))
}
// if lastTag == "" {
// lastTag = tag.Name()
// }
if repo.ReadOnly() {
if readonly == "true" {
continue
}
}
// dur := time.Since(gitAge)
// msg(w, fmt.Sprintf("%-60s %s %s %s", repo.Name(), lastTag, shell.FormatDuration(dur), lastTag, tag.Name()))
msg(w, fmt.Sprintf("%s %d %s", repo.Name(), gitAge.Unix(), lastTag))
/*
for _, tag := range repo.Tags.ListAll() {
msg(w, fmt.Sprintf("%-60s %s", "", tag.Name()))
}
*/
}
default:
msg(w, "BAD URL = "+route)
}

View File

@ -277,6 +277,9 @@ func findNext() bool {
if whitelist(repo.GoPath()) {
continue
}
if repo.Status.Whitelist {
continue
}
if repo.ReadOnly() {
// log.Info("findNext() skipping readonly")
continue