Skip to content

Commit

Permalink
improved the updater a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
markbates committed Feb 26, 2018
1 parent cf5d501 commit 739c787
Showing 1 changed file with 29 additions and 17 deletions.
46 changes: 29 additions & 17 deletions buffalo/cmd/updater/dep.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,36 @@ func DepEnsure(r *Runner) error {
return errors.WithStack(err)
}

for _, p := range []string{"github.com/gobuffalo/[email protected]", "github.com/gobuffalo/[email protected]"} {
cc = exec.Command("dep", "ensure", "-v", "-add", p)
cc.Stdin = os.Stdin
cc.Stderr = os.Stderr
cc.Stdout = os.Stdout
if err := cc.Run(); err != nil {
return errors.WithStack(err)
}
apkg := []string{
"github.com/gobuffalo/[email protected]",
"github.com/gobuffalo/[email protected]",
}
args := []string{"ensure", "-v", "-add"}

for _, p := range []string{"github.com/markbates/inflect"} {
cc = exec.Command("dep", "ensure", "-v", "-update", p)
cc.Stdin = os.Stdin
cc.Stderr = os.Stderr
cc.Stdout = os.Stdout
if err := cc.Run(); err != nil {
return errors.WithStack(err)
}
for _, p := range apkg {
args = append(args, p)
}
return nil
cc = exec.Command("dep", args...)
cc.Stdin = os.Stdin
cc.Stderr = os.Stderr
cc.Stdout = os.Stdout
if err := cc.Run(); err != nil {
return errors.WithStack(err)
}

upkg := []string{
"github.com/gobuffalo/buffalo",
"github.com/gobuffalo/plush",
"github.com/markbates/inflect",
}

args = []string{"ensure", "-v", "-update"}
for _, p := range upkg {
args = append(args, p)
}
cc = exec.Command("dep", args...)
cc.Stdin = os.Stdin
cc.Stderr = os.Stderr
cc.Stdout = os.Stdout
return cc.Run()
}

0 comments on commit 739c787

Please sign in to comment.