rm more code
This commit is contained in:
parent
fb3464abd0
commit
250a96c49f
5
Makefile
5
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)
|
||||
|
||||
|
|
18
main.go
18
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")
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue