Skip to content
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.

remove movinglater #15

Merged
merged 4 commits into from
Feb 25, 2019
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
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

59 changes: 59 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
variables:
GOBIN: "$(GOPATH)/bin" # Go binaries path
GOPATH: "$(system.defaultWorkingDirectory)/gopath" # Go workspace path
modulePath: "$(GOPATH)/src/github.com/$(build.repository.name)" # Path to the module"s code

jobs:
- job: Windows
pool:
vmImage: "vs2017-win2016"
strategy:
matrix:
go 1.9:
go_version: "1.9"
go 1.10:
go_version: "1.10"
go 1.11 (on):
go_version: "1.11"
GO111MODULE: "on"
go 1.11 (off):
go_version: "1.11"
GO111MODULE: "off"
steps:
- template: azure-tests.yml

- job: macOS
pool:
vmImage: "macOS-10.13"
strategy:
matrix:
go 1.9:
go_version: "1.9"
go 1.10:
go_version: "1.10"
go 1.11 (on):
go_version: "1.11"
GO111MODULE: "on"
go 1.11 (off):
go_version: "1.11"
GO111MODULE: "off"
steps:
- template: azure-tests.yml

- job: Linux
pool:
vmImage: "ubuntu-16.04"
strategy:
matrix:
go 1.9:
go_version: "1.9"
go 1.10:
go_version: "1.10"
go 1.11 (on):
go_version: "1.11"
GO111MODULE: "on"
go 1.11 (off):
go_version: "1.11"
GO111MODULE: "off"
steps:
- template: azure-tests.yml
19 changes: 19 additions & 0 deletions azure-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
steps:
- task: GoTool@0
inputs:
version: $(go_version)
- task: Bash@3
inputs:
targetType: inline
script: |
mkdir -p "$(GOBIN)"
mkdir -p "$(GOPATH)/pkg"
mkdir -p "$(modulePath)"
shopt -s extglob
mv !(gopath) "$(modulePath)"
displayName: "Setup Go Workspace"
- script: |
go get -t -v ./...
go test -race ./...
workingDirectory: "$(modulePath)"
displayName: "Tests"
4 changes: 2 additions & 2 deletions cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/gobuffalo/buffalo-plugins/genny/plugin/with"
"github.com/gobuffalo/envy"
"github.com/gobuffalo/genny"
"github.com/gobuffalo/genny/movinglater/gotools"
"github.com/gobuffalo/gogen"
"github.com/gobuffalo/licenser/genny/licenser"
"github.com/gobuffalo/logger"
"github.com/pkg/errors"
Expand Down Expand Up @@ -56,7 +56,7 @@ var generateCmd = &cobra.Command{
r.WithGroup(gg)
}

g, err := gotools.GoFmt(r.Root)
g, err := gogen.Fmt(r.Root)
if err != nil {
return errors.WithStack(err)
}
Expand Down
4 changes: 2 additions & 2 deletions genny/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/gobuffalo/buffalo-plugins/genny/add"
"github.com/gobuffalo/buffalo-plugins/plugins/plugdeps"
"github.com/gobuffalo/genny"
"github.com/gobuffalo/genny/movinglater/gotools"
"github.com/gobuffalo/gogen"
"github.com/pkg/errors"
)

Expand Down Expand Up @@ -39,7 +39,7 @@ func New(opts *Options) (*genny.Group, error) {
if len(p.Tags) > 0 {
args = append(args, "-tags", p.Tags.String())
}
g.RunFn(gotools.Get(p.GoGet, args...))
g.Command(gogen.Get(p.GoGet, args...))
if opts.Vendor {
g.RunFn(pRun(proot, p))
}
Expand Down
2 changes: 2 additions & 0 deletions genny/plugin/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ func (opts *Options) Validate() error {
opts.Author = u.Name
} else if len(u.Username) != 0 {
opts.Author = u.Username
} else {
opts.Author = "unknown"
}
}

Expand Down
8 changes: 7 additions & 1 deletion genny/plugin/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@ func Test_Options_Validate(t *testing.T) {

u, err := user.Current()
r.NoError(err)
r.Equal(u.Name, opts.Author)
if len(u.Name) != 0 {
r.Equal(u.Name, opts.Author)
} else if len(u.Username) != 0 {
r.Equal(u.Username, opts.Author)
} else {
r.Equal("unknown", opts.Author)
}
}
1 change: 1 addition & 0 deletions genny/plugin/plugin-packr.go

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

5 changes: 3 additions & 2 deletions genny/plugin/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

"github.com/gobuffalo/genny/gentest"
"github.com/gobuffalo/genny/movinglater/gotools/gomods"
"github.com/gobuffalo/gogen/gomods"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -43,7 +43,8 @@ func Test_Generator(t *testing.T) {
".gitignore",
".gometalinter.json",
".goreleaser.yml.plush",
".travis.yml",
"azure-pipelines.yml",
"azure-tests.yml",
"LICENSE",
"Makefile",
"README.md",
Expand Down
2 changes: 1 addition & 1 deletion genny/plugin/with/generate/templates/cmd/generate.go.plush
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"<%= opts.PluginPkg %>/genny/<%= opts.ShortName %>"
"github.com/gobuffalo/genny"
"github.com/gobuffalo/genny/movinglater/gotools"
"github.com/gobuffalo/genny/gogen"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion genny/plugin/with/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/gobuffalo/buffalo-plugins/genny/plugin"
"github.com/gobuffalo/genny"
"github.com/gobuffalo/genny/gentest"
"github.com/gobuffalo/genny/movinglater/gotools/gomods"
"github.com/gobuffalo/gogen/gomods"
"github.com/gobuffalo/packr/v2"
"github.com/stretchr/testify/require"
)
Expand Down
1 change: 1 addition & 0 deletions genny/plugin/with/with-packr.go

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

18 changes: 10 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ module github.com/gobuffalo/buffalo-plugins

require (
github.com/BurntSushi/toml v0.3.1
github.com/gobuffalo/envy v1.6.12
github.com/gobuffalo/envy v1.6.15
github.com/gobuffalo/events v1.2.0
github.com/gobuffalo/genny v0.0.0-20190131190646-008a76242145
github.com/gobuffalo/licenser v0.0.0-20181211173111-f8a311c51159
github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c
github.com/gobuffalo/meta v0.0.0-20190126124307-c8fb6f4eb5a9
github.com/gobuffalo/packr/v2 v2.0.0
github.com/gobuffalo/genny v0.0.0-20190219203444-c95082806342
github.com/gobuffalo/gogen v0.0.0-20190224213239-1c6076128bbc
github.com/gobuffalo/licenser v0.0.0-20190224205124-37799bc2ebf6
github.com/gobuffalo/logger v0.0.0-20190224201004-be78ebfea0fa
github.com/gobuffalo/meta v0.0.0-20190207205153-50a99e08b8cf
github.com/gobuffalo/packr/v2 v2.0.2
github.com/gobuffalo/plush v3.7.33+incompatible
github.com/gobuffalo/plushgen v0.0.0-20190104222512-177cd2b872b3
github.com/gobuffalo/release v1.1.6
github.com/gobuffalo/plushgen v0.0.0-20190224160205-347ea233336e
github.com/gobuffalo/release v1.2.2
github.com/gofrs/uuid v3.2.0+incompatible // indirect
github.com/karrick/godirwalk v1.7.8
github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2
github.com/pkg/errors v0.8.1
Expand Down
Loading