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

This needs to be merged before the v0.13.0-beta.1 release can be cut #1303

Merged
merged 3 commits into from
Sep 17, 2018
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
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ update:
$(GO_BIN) mod tidy
packr
make test
make install

release-test:
make ci-test
Expand Down
34 changes: 26 additions & 8 deletions buffalo/cmd/fix/dep.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import (
"fmt"
"os"
"os/exec"
"strings"

"github.com/gobuffalo/buffalo/runtime"
"github.com/gobuffalo/envy"
"github.com/markbates/deplist"
"github.com/pkg/errors"
Expand Down Expand Up @@ -43,19 +45,21 @@ func DepEnsure(r *Runner) error {
}

func runDepEnsure(r *Runner) error {
cc := exec.Command("dep", "ensure", "-v")
cc.Stdin = os.Stdin
cc.Stderr = os.Stderr
cc.Stdout = os.Stdout
if err := cc.Run(); err != nil {
return errors.WithStack(err)
for _, x := range []string{"beta", "rc", "development"} {
if strings.Contains(runtime.Version, x) {
r.Warnings = append(r.Warnings, fmt.Sprintf("This is not an official release and you will need to MANUALLY adjust your Gopkg.toml file to use this release."))
break
}
}

if len(apkg) > 0 {
args := []string{"ensure", "-v", "-add"}
args = append(args, apkg...)
if err := depRunner(args); err != nil {
return errors.WithStack(err)
// *sigh* - yeah, i know
if !strings.Contains(err.Error(), "is already in Gopkg.toml") {
return errors.WithStack(err)
}
}
}

Expand Down Expand Up @@ -83,7 +87,21 @@ func modGetUpdate(r *Runner) error {
cmd.Stdin = os.Stdin
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
return cmd.Run()
if err := cmd.Run(); err != nil {
return errors.WithStack(err)
}

for _, x := range []string{"beta", "rc"} {
if !strings.Contains(runtime.Version, x) {
continue
}
cmd = exec.Command(envy.Get("GO_BIN", "go"), "get", "-u", "github.com/gobuffalo/buffalo@"+runtime.Version)
cmd.Stdin = os.Stdin
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
return cmd.Run()
}
return nil
}

func goGetUpdate(r *Runner) error {
Expand Down
8 changes: 5 additions & 3 deletions buffalo/cmd/fix/fix.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ import (
var YesToAll bool

var replace = map[string]string{
"github.com/markbates/pop": "github.com/gobuffalo/pop",
"github.com/markbates/validate": "github.com/gobuffalo/validate",
"github.com/satori/go.uuid": "github.com/gobuffalo/uuid",
"github.com/markbates/pop": "github.com/gobuffalo/pop",
"github.com/markbates/validate": "github.com/gobuffalo/validate",
"github.com/satori/go.uuid": "github.com/gobuffalo/uuid",
"github.com/shurcooL/github_flavored_markdown": "github.com/gobuffalo/github_flavored_markdown",
}

var ic = ImportConverter{
Expand Down Expand Up @@ -42,6 +43,7 @@ var mr = MiddlewareTransformer{
}

var checks = []Check{
PackrClean,
ic.Process,
mr.transformPackages,
WebpackCheck,
Expand Down
9 changes: 9 additions & 0 deletions buffalo/cmd/fix/packr.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package fix

import "github.com/gobuffalo/packr/builder"

// PackrClean will remove any packr files
func PackrClean(r *Runner) error {
builder.Clean(r.App.Root)
return nil
}
2 changes: 1 addition & 1 deletion buffalo/cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func testPackages(givenArgs []string) ([]string, error) {
}
pkgs := bytes.Split(bytes.TrimSpace(out), []byte("\n"))
for _, p := range pkgs {
if strings.Contains(string(p), "/vendor/") {
if !strings.Contains(string(p), "/vendor/") {
args = append(args, string(p))
}
}
Expand Down
18 changes: 9 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d
github.com/fatih/color v1.7.0
github.com/gobuffalo/buffalo-plugins v0.0.0-20180904210015-930e42a2d09e
github.com/gobuffalo/buffalo-pop v0.0.0-20180903202525-9c42d20c7ebb
github.com/gobuffalo/buffalo-plugins v0.0.0-20180911185405-ca94b2cb30ad
github.com/gobuffalo/buffalo-pop v0.0.0-20180916191218-8a6042d8e9a6
github.com/gobuffalo/envy v1.6.4
github.com/gobuffalo/github_flavored_markdown v1.0.0
github.com/gobuffalo/httptest v1.0.1
Expand All @@ -18,17 +18,16 @@ require (
github.com/gobuffalo/mw-i18n v0.0.0-20180802152014-e3060b7e13d6
github.com/gobuffalo/mw-paramlogger v0.0.0-20180807082017-6b90b69a724a
github.com/gobuffalo/mw-tokenauth v0.0.0-20180802152212-d09751da96e0
github.com/gobuffalo/packr v1.13.3
github.com/gobuffalo/packr v1.13.5
github.com/gobuffalo/plush v3.7.16+incompatible
github.com/gobuffalo/pop v4.7.2+incompatible
github.com/gobuffalo/release v1.0.5 // indirect
github.com/gobuffalo/tags v2.0.10+incompatible
github.com/gobuffalo/tags v2.0.11+incompatible
github.com/gobuffalo/x v0.0.0-20180816203319-dc54d929c4a2
github.com/gorilla/context v1.1.1
github.com/gorilla/mux v1.6.2
github.com/gorilla/sessions v1.1.2
github.com/markbates/deplist v1.0.3
github.com/markbates/grift v1.0.1
github.com/markbates/grift v1.0.2
github.com/markbates/inflect v1.0.0
github.com/markbates/refresh v1.4.3
github.com/markbates/sigtx v1.0.0
Expand All @@ -37,10 +36,11 @@ require (
github.com/sirupsen/logrus v1.0.6
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.2
github.com/spf13/viper v1.1.0
github.com/spf13/viper v1.2.0
github.com/stretchr/testify v1.2.2
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793
github.com/unrolled/secure v0.0.0-20180914162101-439d7b25425f // indirect
golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
golang.org/x/tools v0.0.0-20180904205237-0aa4b8830f48
golang.org/x/tools v0.0.0-20180911133044-677d2ff680c1
gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4
)
Loading