diff --git a/Makefile b/Makefile index 659462c..91ba649 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ VERSION = $(shell git describe --tags) all: @echo run this from the autotypist dir: - @echo " GUIREASON=blah guireleaser" + @echo " GUIRELEASE_REASON=notsure guireleaser" @echo then: @echo " make prepare-release" @echo then: @@ -51,6 +51,9 @@ install: GO111MODULE=off go install -v -x -ldflags " \ -X main.VERSION=${VERSION}" +test: build + GUIRELEASE_REASON=minor ./guireleaser + check-git-clean: @git diff-index --quiet HEAD -- || (echo "Git repository is dirty, please commit your changes first"; exit 1) diff --git a/main.go b/main.go index 8cb05e2..05f2da3 100644 --- a/main.go +++ b/main.go @@ -60,14 +60,16 @@ func main() { os.Exit(0) } - // sanity check of things that might be around that mess - // up things later - // check to make sure we have a go.sum here - gosum := filepath.Join(homeDir, "go/src/go.wit.com/apps/guireleaser/go.sum") - if !shell.Exists(gosum) { - log.Info("go.sum must exist here") - os.Exit(0) - } + /* + // sanity check of things that might be around that mess + // up things later + // check to make sure we have a go.sum here + gosum := filepath.Join(homeDir, "go/src/go.wit.com/apps/guireleaser/go.sum") + if !shell.Exists(gosum) { + log.Info("go.sum must exist here") + os.Exit(0) + } + */ log.Info("Creating the Release Window") diff --git a/releaseBox.go b/releaseBox.go index 14b0c94..8a430f1 100644 --- a/releaseBox.go +++ b/releaseBox.go @@ -169,35 +169,8 @@ func createReleaseBox(box *gui.Node) { group = me.release.box.NewGroup("experimental and potentially dangerous stuff") grid = group.NewGrid("buildOptions", 0, 0) - grid.NewButton("rm -f go.mod go.sum", func() { - me.Disable() - for _, repo := range me.repos.View.AllRepos() { - if whitelist(repo.GoPath()) { - continue - } - if repo.Status.ReadOnly() { - continue - } - repo.Status.Run([]string{"rm", "-f", "go.mod", "go.sum"}) - } - me.Enable() - }) - - grid.NewButton("git reset --hard", func() { - me.Disable() - for _, repo := range me.repos.View.AllRepos() { - if whitelist(repo.GoPath()) { - log.Warn("skipping whitelist", repo.Name()) - continue - } - log.Warn("running git reset --hard", repo.Name()) - repo.Status.Run([]string{"git", "reset", "--hard"}) - } - me.Enable() - }) grid.NewButton("git ls-files |grep go.mod", func() { - // var all []string for _, repo := range me.repos.View.AllRepos() { log.Info("repo:", repo.Name()) if repo.Status.ReadOnly() {