fix the release process somewhat

This commit is contained in:
Jeff Carr 2025-08-31 09:15:25 -05:00
parent 1528d8d507
commit d8706ed738
5 changed files with 25 additions and 7 deletions

View File

@ -92,7 +92,7 @@ safe-build: install
forge list --private
wit-test install --verbose
# cd ~/go/src/go.wit.com/lib/xgb/ && time GUIRELEASE_REASON="safe-build" guireleaser --gui gocui --gui-verbose --gui-file ../../toolkits/gocui/gocui.so >/tmp/forge.log 2>&1
cd ~/go/src/go.wit.com/lib/xgb/ && time GUIRELEASE_REASON="safe-build" guireleaser --gui andlabs
rm -f go.* ; git checkout go.mod ; cd ~/go/src/go.wit.com/lib/xgb/ && time GUIRELEASE_REASON="safe-build" guireleaser --gui andlabs
autocomplete:
guireleaser --bash > ~/.local/share/bash-completion/completions/guireleaser

View File

@ -14,11 +14,10 @@ type args struct {
Verbose bool `arg:"--verbose" help:"talk alot"`
Full bool `arg:"--full" help:"build every package"`
Reason string `arg:"--reason" help:"tag message"`
Force bool `arg:"--force" help:"try harder than normal"`
Port int `arg:"--port" default:"9419" help:"do fun stuff with curl"`
Bash bool `arg:"--bash" help:"generate bash completion"`
BashAuto []string `arg:"--auto-complete" help:"does the actual autocompletion"`
// DumpVersions bool `arg:"--dump-versions" help:"dump the versions file for go.wit.com"`
// Fix bool `arg:"--fix" help:"run fixGoMod() on startup"`
}
type QuickCmd struct {

View File

@ -99,6 +99,23 @@ func doRelease() error {
badExit(errors.New(msg))
}
// this is the final check. even here, just to be a total asshole
// I rerun go mod init and go mod tidy
// the re-parse all the results
// this is the last and final check.
// believe it or not, I've seen this fail. It's not worth being careful here
// or liberal about it. if it doesn't work, yep, you are stuck here you bastard
// (bastard being me. I designed this to be so annoying that if it makes it
// past this point it always works. that is the whole point of this code. NEVER
// EVER FAIL PAST THIS POINT
// )
// so let's do it: let's run go-mod-clean strict
// then reparse everything
_, err := check.RunVerboseOnError([]string{"go-mod-clean", "strict"})
if err != nil {
badExit(err)
}
var all [][]string
var autogen []string
all = append(all, []string{"git", "add", "-f", "go.mod"})
@ -152,9 +169,9 @@ func doRelease() error {
time.Sleep(3 * time.Second)
// this can fail to update, try it again after sleep(3s)
if !doPublishVersion() {
log.Info("PUBLISH FAILED")
log.Info("PUBLISH FAILED gopath=%s", check.GetGoPath())
findOk = false
return fmt.Errorf("PUBLISH FAILED %s", check.GetGoPath())
return fmt.Errorf("PUBLISH FAILED gopath=%s", check.GetGoPath())
}
}

View File

@ -106,7 +106,9 @@ func main() {
if _, count, _, err := me.forge.IsEverythingOnMaster(); err != nil {
log.Info("not everything is on the master branch (", count, "repos)")
os.Exit(-1)
if !argv.Force {
os.Exit(-1)
}
}
if me.startRepo == nil {

View File

@ -38,7 +38,7 @@ func checkpkgcache(repo *gitpb.Repo) error {
}
getpath := repo.GetGoPath() + "@" + repo.GetLastTag()
log.Info("MISSING:", getpath)
log.Infof("~/go/pkg/mod/ IS MISSING %s so I'm running go get here.", getpath)
_, err = me.startRepo.RunVerboseOnError([]string{"go", "get", getpath})
return err
}