From 6fe4db6c12a127ceaedc018ff4eb83199cc3a9e0 Mon Sep 17 00:00:00 2001 From: Antonio Pagano <645522+paganotoni@users.noreply.github.com> Date: Wed, 15 Jul 2020 16:49:29 -0500 Subject: [PATCH] v0.16.11 (#2014) * adding direct version on the docker build * fixing plugin installation * Fix npm's package.json permissions (#2005) Changed created file permissions from 644 (`-w----r--`) to 0644 (`rw-r--r--`) * Bump spf13/viper to v1.7.0 (#1999) * bunping version * changing version on dockerfile * patch to fix the keywords check on new app * removing unneeded append Co-authored-by: Disconnect3d Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com> --- Dockerfile.build | 4 ++-- Dockerfile.slim.build | 4 ++-- genny/newapp/core/options.go | 13 +++++++++++-- runtime/version.go | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Dockerfile.build b/Dockerfile.build index 13e828eb8..b74bea99d 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -33,8 +33,8 @@ RUN npm install -g --no-progress yarn \ RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0 # Pulling docker binary from releases -RUN wget https://github.com/gobuffalo/buffalo/releases/download/v0.16.10/buffalo_0.16.10_Linux_x86_64.tar.gz \ - && tar -xzf buffalo_0.16.10_Linux_x86_64.tar.gz \ +RUN wget https://github.com/gobuffalo/buffalo/releases/download/v0.16.11/buffalo_0.16.11_Linux_x86_64.tar.gz \ + && tar -xzf buffalo_0.16.11_Linux_x86_64.tar.gz \ && mv buffalo $(go env GOPATH)/bin/buffalo RUN go get github.com/gobuffalo/buffalo-pop/v2 diff --git a/Dockerfile.slim.build b/Dockerfile.slim.build index d801bd687..8d9e323b0 100644 --- a/Dockerfile.slim.build +++ b/Dockerfile.slim.build @@ -19,8 +19,8 @@ RUN npm i -g --no-progress yarn \ && yarn config set yarn-offline-mirror-pruning true # Pulling docker binary from releases -RUN wget https://github.com/gobuffalo/buffalo/releases/download/vv0.16.10/buffalo_v0.16.10_Linux_x86_64.tar.gz \ - && tar -xzf buffalo_v0.16.10_Linux_x86_64.tar.gz \ +RUN wget https://github.com/gobuffalo/buffalo/releases/download/v0.16.11/buffalo_v0.16.11_Linux_x86_64.tar.gz \ + && tar -xzf buffalo_v0.16.11_Linux_x86_64.tar.gz \ && mv buffalo $(go env GOPATH)/bin/buffalo RUN go get github.com/gobuffalo/buffalo-pop/v2 diff --git a/genny/newapp/core/options.go b/genny/newapp/core/options.go index 3aba66ef6..9ed4c344b 100644 --- a/genny/newapp/core/options.go +++ b/genny/newapp/core/options.go @@ -71,8 +71,7 @@ func (opts *Options) Validate() error { } name := strings.ToLower(opts.App.Name.String()) - fb := append(opts.ForbiddenNames, "buffalo", "test", "dev") - for _, n := range fb { + for _, n := range opts.ForbiddenNames { rx, err := regexp.Compile(n) if err != nil { return err @@ -82,9 +81,19 @@ func (opts *Options) Validate() error { } } + keywords := []string{"buffalo", "test", "dev"} + for _, kw := range keywords { + if name != kw { + continue + } + + return fmt.Errorf("name %s is not allowed, try a different application name", opts.App.Name) + } + if !nameRX.MatchString(name) { return fmt.Errorf("name %s is not allowed, application name can only contain [a-Z0-9-_]", opts.App.Name) } + return nil } diff --git a/runtime/version.go b/runtime/version.go index 0ac2b003d..d9f4664d6 100644 --- a/runtime/version.go +++ b/runtime/version.go @@ -1,4 +1,4 @@ package runtime // Version is the current version of the buffalo binary -var Version = "v0.16.10" +var Version = "v0.16.11"