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

v0.17.7 #47

Merged
merged 6 commits into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
builds:
-
main: ./cmd/buffalo/main.go
- main: ./cmd/buffalo/main.go
binary: buffalo
env:
- CGO_ENABLED=0
Expand Down Expand Up @@ -37,8 +36,7 @@ changelog:
- '^docs:'
- '^test:'
brews:
-
name: 'buffalo'
- name: 'buffalo'
tap:
owner: 'gobuffalo'
name: 'homebrew-tap'
Expand Down
18 changes: 8 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@ module github.com/gobuffalo/cli

go 1.16

replace github.com/microcosm-cc/bluemonday => github.com/microcosm-cc/bluemonday v1.0.16

require (
github.com/BurntSushi/toml v0.4.1
github.com/fatih/color v1.13.0
github.com/gobuffalo/attrs v1.0.0
github.com/gobuffalo/attrs v1.0.1
github.com/gobuffalo/buffalo-pop/v2 v2.3.0
github.com/gobuffalo/clara/v2 v2.0.2
github.com/gobuffalo/envy v1.9.0
github.com/gobuffalo/events v1.4.1
github.com/gobuffalo/flect v0.2.3
github.com/gobuffalo/envy v1.10.1
github.com/gobuffalo/events v1.4.2
github.com/gobuffalo/flect v0.2.4
github.com/gobuffalo/genny/v2 v2.0.6
github.com/gobuffalo/logger v1.0.4
github.com/gobuffalo/meta v0.3.0
github.com/gobuffalo/packd v1.0.0
github.com/gobuffalo/logger v1.0.6
github.com/gobuffalo/meta v0.3.1
github.com/gobuffalo/packd v1.0.1
github.com/gobuffalo/packr/v2 v2.8.1
github.com/gobuffalo/plush/v4 v4.1.6
github.com/gobuffalo/plush/v4 v4.1.8
github.com/gobuffalo/pop/v5 v5.3.4
github.com/google/go-cmp v0.5.6
github.com/karrick/godirwalk v1.16.1
Expand Down
60 changes: 39 additions & 21 deletions go.sum

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions internal/genny/actions/actions-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions internal/genny/assets/standard/standard-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions internal/genny/assets/webpack/webpack-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions internal/genny/build/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ func assets(opts *Options) (*genny.Generator, error) {
if opts.App.WithNodeJs || opts.App.WithWebpack {
if opts.CleanAssets {
g.RunFn(func(r *genny.Runner) error {
r.Delete(filepath.Join(opts.App.Root, "public", "assets"))
return nil
return r.Delete(filepath.Join(opts.App.Root, "public", "assets"))
})
}
g.RunFn(func(r *genny.Runner) error {
Expand Down
6 changes: 3 additions & 3 deletions internal/genny/build/assets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ func Test_assets(t *testing.T) {
}

run := cokeRunner()
run.WithNew(assets(opts))
r.NoError(run.WithNew(assets(opts)))

envy.MustSet("NODE_ENV", "")
r.NoError(envy.MustSet("NODE_ENV", ""))
ne := envy.Get("NODE_ENV", "")
r.Empty(ne)
r.NoError(run.Run())
Expand Down Expand Up @@ -52,7 +52,7 @@ func Test_assets_Archived(t *testing.T) {

run := cokeRunner()
opts.Root = run.Root
run.WithNew(assets(opts))
r.NoError(run.WithNew(assets(opts)))
r.NoError(run.Run())

res := run.Results()
Expand Down
8 changes: 8 additions & 0 deletions internal/genny/build/build-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions internal/genny/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ func New(opts *Options) (*genny.Generator, error) {
}

g.RunFn(func(r *genny.Runner) error {
events.EmitPayload(EvtBuildStart, events.Payload{"opts": opts})
return nil
return events.EmitPayload(EvtBuildStart, events.Payload{"opts": opts})
})

g.Transformer(genny.Dot())
Expand Down Expand Up @@ -91,8 +90,7 @@ func New(opts *Options) (*genny.Generator, error) {

g.Command(c)
g.RunFn(func(r *genny.Runner) error {
events.EmitPayload(EvtBuildStop, events.Payload{"opts": opts})
return nil
return events.EmitPayload(EvtBuildStop, events.Payload{"opts": opts})
})

g.RunFn(Cleanup(opts))
Expand Down
23 changes: 2 additions & 21 deletions internal/genny/build/build_deps.go
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
package build

import (
"os/exec"

"github.com/gobuffalo/envy"
"github.com/gobuffalo/genny/v2"
)

func buildDeps(opts *Options) (*genny.Generator, error) {
g := genny.New()
err := opts.Validate()

if err := opts.Validate(); err != nil {
return g, err
}

if envy.Mods() {
return g, nil
}

// mount the go get runner
tf := opts.App.BuildTags(opts.Environment, opts.Tags...)
if len(tf) > 0 {
tf = append([]string{"-tags"}, tf.String())
}
args := []string{"get"}
args = append(args, tf...)
args = append(args, "./...")
g.Command(exec.Command("go", args...))
return g, nil
return g, err
}
14 changes: 2 additions & 12 deletions internal/genny/build/build_deps_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package build

import (
"strings"
"testing"

"github.com/gobuffalo/envy"
"github.com/gobuffalo/genny/v2/gentest"
"github.com/gobuffalo/meta"
"github.com/stretchr/testify/require"
Expand All @@ -18,18 +16,10 @@ func Test_buildDeps(t *testing.T) {
}

run := gentest.NewRunner()
run.WithNew(buildDeps(opts))
r.NoError(run.WithNew(buildDeps(opts)))

r.NoError(run.Run())

res := run.Results()

if envy.Mods() {
r.Len(res.Commands, 0)
return
}
r.Len(res.Commands, 1)

c := res.Commands[0]
r.Equal("go get -tags development foo ./...", strings.Join(c.Args, " "))
r.Len(res.Commands, 0)
}
9 changes: 4 additions & 5 deletions internal/genny/build/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"os/exec"
"path/filepath"

"github.com/gobuffalo/envy"
"github.com/gobuffalo/genny/v2"
"github.com/gobuffalo/packr/v2/jam"
)
Expand Down Expand Up @@ -36,13 +35,13 @@ func Cleanup(opts *Options) genny.RunFn {
// Keep this file
continue
}
r.Disk.Delete(f.Name())
}
if envy.Mods() && opts.WithBuildDeps {
if err := r.Exec(exec.Command("go", "mod", "tidy")); err != nil {
if err := r.Disk.Delete(f.Name()); err != nil {
return err
}
}
if opts.WithBuildDeps {
return r.Exec(exec.Command("go", "mod", "tidy"))
}
return nil
}
}
4 changes: 2 additions & 2 deletions internal/genny/build/cleanup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func Test_WithDeps(t *testing.T) {
opts.rollback = &emptyMap

f := Cleanup(opts)
f(run)
r.NoError(f(run))

results := run.Results()

Expand All @@ -54,7 +54,7 @@ func Test_WithoutDeps(t *testing.T) {
opts.rollback = &emptyMap

f := Cleanup(opts)
f(run)
r.NoError(f(run))

results := run.Results()

Expand Down
3 changes: 1 addition & 2 deletions internal/genny/build/template_walker.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ func (d dirWalker) Walk(fn packd.WalkFunc) error {
return fn(path, f)
}

godirwalk.Walk(d.dir, &godirwalk.Options{
return godirwalk.Walk(d.dir, &godirwalk.Options{
FollowSymbolicLinks: true,
Callback: callback,
})
return nil
}

func templateWalker(app meta.App) packd.Walkable {
Expand Down
8 changes: 8 additions & 0 deletions internal/genny/ci/ci-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions internal/genny/docker/docker-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions internal/genny/mail/mail-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions internal/genny/newapp/api/api-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions internal/genny/newapp/core/core-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions internal/genny/newapp/web/web-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions internal/genny/refresh/refresh-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions internal/genny/resource/resource-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions internal/genny/vcs/vcs-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/runtime/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package runtime

// Version is the current version of the buffalo binary
var Version = "v0.17.6"
var Version = "v0.17.7"
232 changes: 232 additions & 0 deletions packrd/packed-packr.go

Large diffs are not rendered by default.