Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
Run go mod tidy when initializing a new project (#2124)
Browse files Browse the repository at this point in the history
* Run go mod tidy when initializing a new project

* Use Go 1.15 instead of 1.14 during workflows
  • Loading branch information
fasmat authored Jul 7, 2021
1 parent 6b07979 commit 4417f80
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
-
name: Set up Go 1.14
name: Set up Go 1.15
uses: actions/setup-go@v1
with:
go-version: 1.14
go-version: 1.15
id: go
-
name: Checkout Code
Expand Down
6 changes: 6 additions & 0 deletions buffalo/cmd/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ var newCmd = &cobra.Command{
}
run.WithGroup(gg)

g := genny.New()
g.Command(exec.Command("go", "mod", "tidy"))
if err := run.With(g); err != nil {
return nil
}

if err := run.WithNew(gogen.Fmt(app.Root)); err != nil {
return err
}
Expand Down

0 comments on commit 4417f80

Please sign in to comment.