diff --git a/genny/build/apkg.go b/genny/build/apkg.go index baed67c94..9a5479a65 100644 --- a/genny/build/apkg.go +++ b/genny/build/apkg.go @@ -1,6 +1,8 @@ package build import ( + "os/exec" + "github.com/gobuffalo/genny/v2" ) @@ -13,10 +15,15 @@ func apkg(opts *Options) (*genny.Generator, error) { g.RunFn(copyInflections) g.RunFn(copyDatabase) + g.RunFn(addDependencies) return g, nil } +func addDependencies(r *genny.Runner) error { + return r.Exec(exec.Command("go", "get", "-d")) +} + func copyDatabase(r *genny.Runner) error { defer func() { r.Disk.Remove("database.yml") diff --git a/genny/build/build-packr.go b/genny/build/build-packr.go deleted file mode 100644 index 9a999f396..000000000 --- a/genny/build/build-packr.go +++ /dev/null @@ -1,8 +0,0 @@ -// +build !skippackr -// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT. - -// You can use the "packr clean" command to clean up this, -// and any other packr generated files. -package build - -import _ "github.com/gobuffalo/buffalo/packrd" diff --git a/genny/build/build_test.go b/genny/build/build_test.go index 6d187c715..cfb73d8af 100644 --- a/genny/build/build_test.go +++ b/genny/build/build_test.go @@ -56,7 +56,7 @@ func Test_New(t *testing.T) { // we should never leave any files modified or dropped r.Len(res.Files, 0) - cmds := []string{"go build -tags bar -o bin/foo", "go mod tidy"} + cmds := []string{"go get -d", "go build -tags bar -o bin/foo", "go mod tidy"} r.Len(res.Commands, len(cmds)) for i, c := range res.Commands { eq(r, cmds[i], c) @@ -84,7 +84,7 @@ func Test_NewWithoutBuildDeps(t *testing.T) { res := run.Results() - cmds := []string{"go build -tags bar -o bin/foo"} + cmds := []string{"go get -d", "go build -tags bar -o bin/foo"} r.Len(res.Commands, len(cmds)) for i, c := range res.Commands { eq(r, cmds[i], c)