diff --git a/.goreleaser.yml b/.goreleaser.yml index 86f3407c2..50dc81083 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,9 +1,27 @@ -project_name: buffalo -release: - github: - owner: gobuffalo - name: buffalo - name_template: '{{.Tag}}' +builds: +- + goos: + - darwin + - linux + - windows + env: + - CGO_ENABLED=0 + main: ./buffalo/main.go + binary: buffalo-no-sqlite + # hooks: + # pre: packr + # post: packr clean + +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' brew: name: buffalo github: @@ -16,52 +34,3 @@ brew: mv "#{bin}/buffalo-no-sqlite", "#{bin}/buffalo" test: | system "#{bin}/buffalo", "version" -builds: - - - goos: - - linux - - darwin - - windows - goarch: - - amd64 - goarm: - - "6" - main: ./buffalo/main.go - binary: buffalo-no-sqlite - hooks: - pre: packr - post: packr clean -archive: - name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm - }}v{{ .Arm }}{{ end }}' - format: tar.gz - files: - - licence* - - LICENCE* - - license* - - LICENSE* - - readme* - - README* - - changelog* - - CHANGELOG* -fpm: - name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm - }}v{{ .Arm }}{{ end }}' - bindir: /usr/local/bin -snapcraft: - name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm - }}v{{ .Arm }}{{ end }}' -snapshot: - name_template: SNAPSHOT-{{ .Commit }} -checksum: - name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt' -dist: dist -sign: - cmd: gpg - args: - - --output - - $signature - - --detach-sig - - $artifact - signature: ${artifact}.sig - artifacts: none diff --git a/Dockerfile b/Dockerfile index fa02addb1..a16402570 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,9 +23,14 @@ RUN mkdir -p $BP WORKDIR $BP ADD . . -RUN go get -u github.com/gobuffalo/buffalo-pop/... +RUN go get github.com/gobuffalo/buffalo-pop RUN make install +RUN cat runtime/version.go +RUN go get -u github.com/alecthomas/gometalinter +RUN gometalinter --install +RUN gometalinter --vendor --deadline=5m ./... --skip=internal + RUN go test -tags "sqlite integration_test" -race ./... RUN go test -tags "sqlite integration_test" -coverprofile cover.out -covermode count ./... @@ -34,10 +39,6 @@ RUN if [ -z "$CODECOV_TOKEN" ] ; then \ else curl -s https://codecov.io/bash -o codecov && \ bash codecov -f cover.out -X fix; fi -RUN go get -u github.com/alecthomas/gometalinter -RUN gometalinter --install -RUN gometalinter --vendor --deadline=5m ./... --skip=internal - WORKDIR $GOPATH/src/ # START: tests bins are built with tags properly diff --git a/Makefile b/Makefile index 7839237a5..5a05c7656 100644 --- a/Makefile +++ b/Makefile @@ -1,28 +1,24 @@ TAGS ?= "sqlite" -INSTALL ?= install -v -tags ${TAGS} ./... - GO_BIN ?= go -GO_GET ?= $(GO_BIN) get -tags "sqlite" -v -t github.com/gobuffalo/buffalo/... install: deps packr - $(GO_GET) - $(GO_BIN) $(INSTALL) - packr clean - -ifeq ("$(GO_BIN)","vgo") - GO_GET = vgo version -endif + $(GO_BIN) install -v . deps: - $(GO_BIN) install -v github.com/gobuffalo/packr/packr + $(GO_BIN) get github.com/gobuffalo/packr/packr + $(GO_BIN) get -tags ${TAGS} -t ./... + +build: deps + packr + $(GO_BIN) build -v . test: + packr $(GO_BIN) test -tags ${TAGS} ./... -ci-test: - $(GO_BIN) test -tags ${TAGS} -race -v ./... - docker build . +ci-test: deps + docker build . --no-cache lint: gometalinter --vendor ./... --deadline=1m --skip=internal @@ -32,3 +28,10 @@ update: $(GO_BIN) mod tidy packr make test + +release-test: + make ci-test + +release: + $(GO_BIN) get github.com/gobuffalo/release + release -y -f runtime/version.go diff --git a/SHOULDERS.md b/SHOULDERS.md index 763ba9860..438899278 100644 --- a/SHOULDERS.md +++ b/SHOULDERS.md @@ -1,12 +1,10 @@ -# `github.com/gobuffalo/buffalo` Stands on the Shoulders of Giants +# github.com/gobuffalo/buffalo Stands on the Shoulders of Giants -`github.com/gobuffalo/buffalo` does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants this project would not be possible. Please make sure to check them out and thank them for all of their hard work. +github.com/gobuffalo/buffalo does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants this project would not be possible. Please make sure to check them out and thank them for all of their hard work. Thank you to the following **GIANTS**: -* [C](https://godoc.org/C) - * [github.com/BurntSushi/toml](https://godoc.org/github.com/BurntSushi/toml) * [github.com/ajg/form](https://godoc.org/github.com/ajg/form) @@ -21,10 +19,6 @@ Thank you to the following **GIANTS**: * [github.com/fatih/color](https://godoc.org/github.com/fatih/color) -* [github.com/fatih/color/vendor/github.com/mattn/go-colorable](https://godoc.org/github.com/fatih/color/vendor/github.com/mattn/go-colorable) - -* [github.com/fatih/color/vendor/github.com/mattn/go-isatty](https://godoc.org/github.com/fatih/color/vendor/github.com/mattn/go-isatty) - * [github.com/fatih/structs](https://godoc.org/github.com/fatih/structs) * [github.com/fsnotify/fsnotify](https://godoc.org/github.com/fsnotify/fsnotify) @@ -73,16 +67,14 @@ Thank you to the following **GIANTS**: * [github.com/gobuffalo/pop/fix](https://godoc.org/github.com/gobuffalo/pop/fix) +* [github.com/gobuffalo/pop/logging](https://godoc.org/github.com/gobuffalo/pop/logging) + * [github.com/gobuffalo/pop/nulls](https://godoc.org/github.com/gobuffalo/pop/nulls) * [github.com/gobuffalo/pop/slices](https://godoc.org/github.com/gobuffalo/pop/slices) -* [github.com/gobuffalo/pop/soda/cmd](https://godoc.org/github.com/gobuffalo/pop/soda/cmd) - * [github.com/gobuffalo/pop/soda/cmd/generate](https://godoc.org/github.com/gobuffalo/pop/soda/cmd/generate) -* [github.com/gobuffalo/pop/soda/cmd/schema](https://godoc.org/github.com/gobuffalo/pop/soda/cmd/schema) - * [github.com/gobuffalo/tags](https://godoc.org/github.com/gobuffalo/tags) * [github.com/gobuffalo/tags/form](https://godoc.org/github.com/gobuffalo/tags/form) @@ -183,6 +175,10 @@ Thank you to the following **GIANTS**: * [github.com/markbates/willie](https://godoc.org/github.com/markbates/willie) +* [github.com/mattn/go-colorable](https://godoc.org/github.com/mattn/go-colorable) + +* [github.com/mattn/go-isatty](https://godoc.org/github.com/mattn/go-isatty) + * [github.com/mattn/go-sqlite3](https://godoc.org/github.com/mattn/go-sqlite3) * [github.com/microcosm-cc/bluemonday](https://godoc.org/github.com/microcosm-cc/bluemonday) @@ -375,6 +371,8 @@ Thank you to the following **GIANTS**: * [golang.org/x/text/unicode/rangetable](https://godoc.org/golang.org/x/text/unicode/rangetable) +* [golang.org/x/tools/go/ast/astutil](https://godoc.org/golang.org/x/tools/go/ast/astutil) + * [gopkg.in/check.v1](https://godoc.org/gopkg.in/check.v1) * [gopkg.in/russross/blackfriday.v1](https://godoc.org/gopkg.in/russross/blackfriday.v1) diff --git a/generators/assets/standard/a_standard-packr.go b/generators/assets/standard/a_standard-packr.go index db1e37776..9058e1e6b 100644 --- a/generators/assets/standard/a_standard-packr.go +++ b/generators/assets/standard/a_standard-packr.go @@ -9,5 +9,6 @@ import "github.com/gobuffalo/packr" func init() { packr.PackJSONBytes("../standard/templates", "public/assets/application.css.tmpl", "\"\"") packr.PackJSONBytes("../standard/templates", "public/assets/application.js.tmpl", "\"\"") + packr.PackJSONBytes("../standard/templates", "public/assets/buffalo.css.tmpl", "\"Ci5jb250YWluZXIgewoJbWluLXdpZHRoOiAzMjBweDsKfQoKaGVhZGVyIHsKCWJhY2tncm91bmQtY29sb3I6ICM2MmE1ZWU7CglwYWRkaW5nOiAxMHB4IDIwcHg7Cglib3gtc2l6aW5nOiBib3JkZXItYm94Owp9CgoubG9nbyBpbWcgewoJd2lkdGg6IDgwcHg7Cn0KCi50aXRsZXMgaDEgewoJZm9udC1zaXplOiAzMHB4OwoJZm9udC13ZWlnaHQ6IDMwMDsKCWNvbG9yOiB3aGl0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cHg7CgkJbWFyZ2luOiAxNXB4IDAgNXB4IDA7Cgl9Cn0KCkBtZWRpYSBhbGwgYW5kIChtYXgtd2lkdGg6IDY0MHB4KSB7CgkudGl0bGVzIGgxIHsKCQlmb250LXNpemU6IDIzcHg7CgkJbWFyZ2luOiAxNXB4IDAgNXB4IDA7Cgl9CgkudGl0bGVzIGgyIHsKCQlmb250LXNpemU6IDE1cHg7Cgl9CgkudGl0bGVzIC5kb2N1bWVudGF0aW9uIHsKCQltYXJnaW4tbGVmdDogMTBweDsKCX0KfQoKQG1lZGlhIGFsbCBhbmQgKG1heC13aWR0aDogNTMwcHgpIHsKCS50aXRsZXMgaDEgewoJCWZvbnQtc2l6ZTogMjBweDsKCQltYXJnaW46IDVweCAwOwoJfQoJLmxvZ28gewoJCXBhZGRpbmc6IDAKCX0KCS5sb2dvIGltZyB7CgkJd2lkdGg6IDEwMCUKCX0KCS50aXRsZXMgLmRvY3VtZW50YXRpb24gewoJCW1hcmdpbi1sZWZ0OiAwcHg7CgkJbWFyZ2luLXRvcDogNXB4OwoJCWRpc3BsYXk6IGJsb2NrOwoJfQp9\"") packr.PackJSONBytes("../standard/templates", "public/assets/images/favicon.ico.tmpl", "\"AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABILAAASCwAAAAAAAAAAAAD///////////z8/f//////7+/u/5+ks/9ea4z/QlJ9/0BRff9ZZ4r/k5qs/+Xm5////////Pz9//7+/v////////////39/v//////sLS//zdKeP8YOHf/HDx7/yA+e/8gPHr/GjR1/xUwcv8sP3L/maCx///+/P/+/v7//v7+//39/v//////jZWo/xAoaP8kTIb/OmGF/zFkl/8sYpf/LWSd/y9WhP8ySnH/JEiH/w4oaf9ve5b///78//7+////////rbO9/xEsZ/8mPXr/JD91/0Zifv9hj6z/XpC0/16Stv9hjaf/PmGC/ydOiP8oP3v/DChj/4uSpP//////7uzq/0Funf8rZaH/MGOd/yZRjf9ejK//cKPA/1JwhP9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ets/webpack/a_webpack-packr.go b/generators/assets/webpack/a_webpack-packr.go index 3f4c02d23..04fb8c119 100644 --- a/generators/assets/webpack/a_webpack-packr.go +++ b/generators/assets/webpack/a_webpack-packr.go @@ -7,7 +7,8 @@ import "github.com/gobuffalo/packr" // You can use the "packr clean" command to clean up this, // and any other packr generated files. func init() { - packr.PackJSONBytes("../webpack/templates", "assets/css/application.scss.tmpl", "\"e3sgaWYgZXEgLm9wdHMuQm9vdHN0cmFwIDMgLX19CkBpbXBvcnQgIn5ib290c3RyYXAtc2Fzcy9hc3NldHMvc3R5bGVzaGVldHMvX2Jvb3RzdHJhcC1zcHJvY2tldHMuc2NzcyI7CkBpbXBvcnQgIn5ib290c3RyYXAtc2Fzcy9hc3NldHMvc3R5bGVzaGVldHMvX2Jvb3RzdHJhcC5zY3NzIjsKe3sgZWxzZSAtfX0KQGltcG9ydCAifmJvb3RzdHJhcC9zY3NzL2Jvb3RzdHJhcC5zY3NzIjsKe3sgZW5kIC19fQpAaW1wb3J0ICJ+Zm9udC1hd2Vzb21lL2Nzcy9mb250LWF3ZXNvbWUuY3NzIjsK\"") + packr.PackJSONBytes("../webpack/templates", "assets/css/_buffalo.scss.tmpl", "\"LmNvbnRhaW5lciB7CgltaW4td2lkdGg6IDMyMHB4Owp9CgpoZWFkZXIgewoJYmFja2dyb3VuZC1jb2xvcjogIzYyYTVlZTsKCXBhZGRpbmc6IDEwcHggMjBweDsKCWJveC1zaXppbmc6IGJvcmRlci1ib3g7Cn0KCi5sb2dvIGltZyB7Cgl3aWR0aDogODBweDsKfQoKLnRpdGxlcyBoMSB7Cglmb250LXNpemU6IDMwcHg7Cglmb250LXdlaWdodDogMzAwOwoJY29sb3I6IHdoaXRlOwoJbWFyZ2luLWJvdHRvbTogMTNweDsKCW1hcmdpbi10b3A6IDVweDsKfQoKLnRpdGxlcyBoMiB7Cglmb250LXdlaWdodDogMzAwOwoJZm9udC1zaXplOiAxOHB4OwoJZGlzcGxheTogaW5saW5lLWJsb2N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XRsZXMgaDIgewoJCWZvbnQtc2l6ZTogMTVweDsKCX0KCS50aXRsZXMgLmRvY3VtZW50YXRpb24gewoJCW1hcmdpbi1sZWZ0OiAxMHB4OwoJfQp9CgpAbWVkaWEgYWxsIGFuZCAobWF4LXdpZHRoOiA1MzBweCkgewoJLnRpdGxlcyBoMSB7CgkJZm9udC1zaXplOiAyMHB4OwoJCW1hcmdpbjogNXB4IDA7Cgl9CgkubG9nbyB7CgkJcGFkZGluZzogMAoJfQoJLmxvZ28gaW1nIHsKCQl3aWR0aDogMTAwJQoJfQoJLnRpdGxlcyAuZG9jdW1lbnRhdGlvbiB7CgkJbWFyZ2luLWxlZnQ6IDBweDsKCQltYXJnaW4tdG9wOiA1cHg7CgkJZGlzcGxheTogYmxvY2s7Cgl9Cn0=\"") + packr.PackJSONBytes("../webpack/templates", "assets/css/application.scss.tmpl", "\"e3sgaWYgZXEgLm9wdHMuQm9vdHN0cmFwIDMgLX19CkBpbXBvcnQgIn5ib290c3RyYXAtc2Fzcy9hc3NldHMvc3R5bGVzaGVldHMvX2Jvb3RzdHJhcC1zcHJvY2tldHMuc2NzcyI7CkBpbXBvcnQgIn5ib290c3RyYXAtc2Fzcy9hc3NldHMvc3R5bGVzaGVldHMvX2Jvb3RzdHJhcC5zY3NzIjsKe3sgZWxzZSAtfX0KQGltcG9ydCAifmJvb3RzdHJhcC9zY3NzL2Jvb3RzdHJhcC5zY3NzIjsKe3sgZW5kIC19fQpAaW1wb3J0ICJ+Zm9udC1hd2Vzb21lL2Nzcy9mb250LWF3ZXNvbWUuY3NzIjsKCkBpbXBvcnQgImJ1ZmZhbG8i\"") packr.PackJSONBytes("../webpack/templates", "assets/images/favicon.ico.tmpl", "\"AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABILAAASCwAAAAAAAAAAAAD///////////z8/f//////7+/u/5+ks/9ea4z/QlJ9/0BRff9ZZ4r/k5qs/+Xm5////////Pz9//7+/v////////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+xvb//p7W3/5Sepf/w8PH////////////Q19T/3uHe/83Mxv+wtaP/zNDE/9zg3v+fp53/tLml/9Xawv/K0Lf/trup/7W4s//y8vL///////7+/v/+/v7//f3+//7/////////4OHg/76/sf+4uaH/ycml/8jHpP+8vKD/vL2u/9fX1v/9/f3///////7+/v//////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\"") packr.PackJSONBytes("../webpack/templates", "assets/js/application.js.tmpl", "\"cmVxdWlyZSgiZXhwb3NlLWxvYWRlcj8kIWV4cG9zZS1sb2FkZXI/alF1ZXJ5IWpxdWVyeSIpOwp7eyBpZiBlcSAub3B0cy5Cb290c3RyYXAgMyAtfX0KcmVxdWlyZSgiYm9vdHN0cmFwLXNhc3MvYXNzZXRzL2phdmFzY3JpcHRzL2Jvb3RzdHJhcC5qcyIpOwp7eyBlbHNlIC19fQpyZXF1aXJlKCJib290c3RyYXAvZGlzdC9qcy9ib290c3RyYXAuYnVuZGxlLmpzIik7Cnt7IGVuZCAtfX0KCiQoKCkgPT4gewoKfSk7Cg==\"") packr.PackJSONBytes("../webpack/templates", "dot-babelrc.tmpl", "\"ewogICJwcmVzZXRzIjogWyJAYmFiZWwvcHJlc2V0LWVudiJdCn0=\"") diff --git a/generators/newapp/a_newapp-packr.go b/generators/newapp/a_newapp-packr.go index 3d7968f8c..976399e09 100644 --- a/generators/newapp/a_newapp-packr.go +++ b/generators/newapp/a_newapp-packr.go @@ -23,6 +23,6 @@ func init() { packr.PackJSONBytes("../newapp/templates", "main.go.tmpl", "\"cGFja2FnZSBtYWluCgppbXBvcnQgKAogICJsb2ciCgogICJ7eyAub3B0cy5BY3Rpb25zUGtnIH19IgopCgovLyBtYWluIGlzIHRoZSBzdGFydGluZyBwb2ludCBmb3IgeW91ciBCdWZmYWxvIGFwcGxpY2F0aW9uLgovLyBZb3UgY2FuIGZlZWwgZnJlZSBhbmQgY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Lwo=\"") packr.PackJSONBytes("../newapp/templates", "templates/_flash.html.tmpl", "\"PGRpdiBjbGFzcz0icm93Ij4KICA8ZGl2IGNsYXNzPSJjb2wtbWQtMTIiPgogICAgPCU9IGZvciAoaywgbWVzc2FnZXMpIGluIGZsYXNoIHsgJT4KICAgICAgPCU9IGZvciAobXNnKSBpbiBtZXNzYWdlcyB7ICU+CiAgICAgICAgPGRpdiBjbGFzcz0iYWxlcnQgYWxlcnQtPCU9IGsgJT4iIHJvbGU9ImFsZXJ0Ij4KICAgICAgICAgIDwlPSBtc2cgJT4KICAgICAgICAgIDxidXR0b24gdHlwZT0iYnV0dG9uIiBjbGFzcz0iY2xvc2UiIGRhdGEtZGlzbWlzcz0iYWxlcnQiIGFyaWEtbGFiZWw9IkNsb3NlIj4KICAgICAgICAgICAgPHNwYW4gYXJpYS1oaWRkZW49InRydWUiPiZ0aW1lczs8L3NwYW4+CiAgICAgICAgICA8L2J1dHRvbj4KICAgICAgICA8L2Rpdj4KICAgICAgPCUgfSAlPgogICAgPCUgfSAlPgogIDwvZGl2Pgo8L2Rpdj4K\"") - packr.PackJSONBytes("../newapp/templates", "templates/application.html.tmpl", "\"PCFET0NUWVBFIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCwgaW5pdGlhbC1zY2FsZT0xIj4KICAgIDxtZXRhIGNoYXJzZXQ9InV0Zi04Ij4KICAgIDx0aXRsZT5CdWZmYWxvIC0ge3sgLm9wdHMuTmFtZS5UaXRsZSB9fTwvdGl0bGU+CiAge3stIGlmIG5vdCAub3B0cy5XaXRoV2VicGFjayB9fQogICAge3stIGlmIGVxIC5vcHRzLkJvb3RzdHJhcCAzIH19CiAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vbWF4Y2RuLmJvb3RzdHJhcGNkbi5jb20vYm9vdHN0cmFwLzMuMy43L2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templates", "templates/index.html.tmpl", "\"PHN0eWxlIG1lZGlhPSJzY3JlZW4iPgogIC5jb250YWluZXIgewogICAgbWluLXdpZHRoOiAzMjBweDsKICB9CgogIGhlYWRlciB7CiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjNjJhNWVlOwogICAgcGFkZGluZzogMTBweCAyMHB4OwogICAgYm94LXNpemluZzogYm9yZGVyLWJveDsKICB9CgogIC5sb2dvIGltZyB7CiAgICB3aWR0aDogODBweDsKICB9CgogIC50aXRsZXMgaDEgewogICAgZm9udC1zaXplOiAzMHB4OwogICAgZm9udC13ZWlnaHQ6IDMwMDsKICAgIGNvbG9yOiB3aGl0ZTsKICAgIG1hcmdpbi1ib3R0b206IDEzcHg7CiAgICBtYXJnaW4tdG9wOiA1cHg7CiAgfQoKICAudGl0bGVzIGgyIHsKICAgIGZvbnQtd2VpZ2h0OiAzMDA7CiAgICBmb250LXNpemU6IDE4cHg7CiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7CiAgICBtYXJnaW46IDA7CiAgfQoKICAudGl0bGVzIGEgewogICAgY29sb3I6IHdoaXRlOwogICAgdGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmU7CiAgfQoKICAudGl0bGVzIGkgewogICAgbWFyZ2luLXJpZ2h0OiA1cHg7CiAgICB0ZXh0LWRlY29yYXRpb246IG5vbmU7CiAgfQoKICAudGl0bGVzIC5kb2N1bWVudGF0aW9uIHsKICAgIG1hcmdpbi1sZWZ0OiAyOHB4OwogIH0KCiAgLnN1YnRpdGxlIHsKICAgIGNvbG9yOiB3aGl0ZTsKICAgIG1hcmdpbjogMDsKICAgIHBhZGRpbmc6IDEzcHggMDsKICAgIGJhY2tncm91bmQtY29sb3I6ICMyYTM1NDM7CiAgICBtYXJnaW4tYm90dG9tOiAyMHB4OwogIH0KCiAgLnN1YnRpdGxlIGgzIHsKICAgIGZvbnQtc2l6ZTogMjJweDsKICAgIGZvbnQtd2VpZ2h0OiA0MDA7CiAgICBtYXJnaW46IDA7CiAgfQoKICB0YWJsZSB7CiAgICBmb250LXNpemU6IDE0cHg7CiAgfQoKICB0YWJsZS50YWJsZSB0Ym9keSB0ciB0ZCB7CiAgICBib3JkZXItdG9wOiAwOwogICAgcGFkZGluZzogMTBweDsKICB9CgogIC5mb290IHsKICAgIHRleHQtYWxpZ246IHJpZ2h0OwogICAgY29sb3I6ICNjNWM1YzU7CiAgICBmb250LXdlaWdodDogMzAwOwogIH0KCiAgLmZvb3QgYSB7CiAgICBjb2xvcjogIzhiOGI4YjsKICAgIHRleHQtZGVjb3JhdGlvbjogdW5kZXJsaW5lOwogIH0KCiAgLmNlbnRlcmVkIHsKICAgIHRleHQtYWxpZ246IGNlbnRlcjsKICB9CgogIEBtZWRpYSBhbGwgYW5kIChtYXgtd2lkdGg6IDc3MHB4KSB7CiAgICAudGl0bGVzIGgxIHsKICAgICAgZm9udC1zaXplOiAyNXB4OwogICAgICBtYXJnaW46IDE1cHggMCA1cHggMDsKICAgIH0KICB9CgogIEBtZWRpYSBhbGwgYW5kIChtYXgtd2lkdGg6IDY0MHB4KSB7CiAgICAudGl0bGVzIGgxIHsKICAgICAgZm9udC1zaXplOiAyM3B4OwogICAgICBtYXJnaW46IDE1cHggMCA1cHggMDsKICAgIH0KICAgIC50aXRsZXMgaDIgewogICAgICBmb250LXNpemU6IDE1cHg7CiAgICB9CiAgICAudGl0bGVzIC5kb2N1bWVudGF0aW9uIHsKICAgICAgbWFyZ2luLWxlZnQ6IDEwcHg7CiAgICB9CiAgfQoKICBAbWVkaWEgYWxsIGFuZCAobWF4LXdpZHRoOiA1MzBweCkgewogICAgLnRpdGxlcyBoMSB7CiAgICAgIGZvbnQtc2l6ZTogMjBweDsKICAgICAgbWFyZ2luOiA1cHggMDsKICAgIH0KICAgIC5sb2dvIHsKICAgICAgcGFkZGluZzogMAogICAgfQogICAgLmxvZ28gaW1nIHsKICAgICAgd2lkdGg6IDEwMCUKICAgIH0KICAgIC50aXRsZXMgLmRvY3Vt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XYgY2xhc3M9ImNvbC1tZC0xMiI+CiAgICA8ZGl2IGNsYXNzPSJzdWJ0aXRsZSI+CiAgICAgIDxkaXYgY2xhc3M9ImNvbnRhaW5lciI+CiAgICAgICAgPGgzPkRlZmluZWQgUm91dGVzPC9oMz4KICAgICAgPC9kaXY+CiAgICA8L2Rpdj4KICAgIDxkaXYgY2xhc3M9InRhYmxlLXJlc3BvbnNpdmUiPgogICAgICA8dGFibGUgY2xhc3M9InRhYmxlIHRhYmxlLXN0cmlwZWQiPgogICAgICAgIDx0aGVhZD4KICAgICAgICAgIDx0ciB0ZXh0LWFsaWduPSJsZWZ0Ij4KICAgICAgICAgICAgPHRoIGNsYXNzPSJjZW50ZXJlZCI+TUVUSE9EPC90aD4KICAgICAgICAgICAgPHRoPlBBVEg8L3RoPgogICAgICAgICAgICA8dGg+TkFNRTwvdGg+CiAgICAgICAgICAgIDx0aD5IQU5ETEVSPC90aD4KICAgICAgICAgIDwvdHI+CiAgICAgICAgPC90aGVhZD4KICAgICAgICA8dGJvZHk+CgogICAgICAgICAgPCU9IGZvciAocikgaW4gcm91dGVzIHsgJT4KICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgIDx0ZCBjbGFzcz0iY2VudGVyZWQiPgogICAgICAgICAgICAgICAgPCU9IHIuTWV0aG9kICU+CiAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICA8dGQ+CiAgICAgICAgICAgICAgICA8JT0gaWYgKHIuTWV0aG9kICE9ICJHRVQiIHx8IHIuUGF0aCB+PSAieyIpIHsgJT4KICAgICAgICAgICAgICAgICAgPCU9IHIuUGF0aCAlPgogICAgICAgICAgICAgICAgPCUgfSBlbHNlIHsgJT4KICAgICAgICAgICAgICAgICAgPGEgaHJlZj0iPCU9IHIuUGF0aCAlPiI+PCU9IHIuUGF0aCAlPjwvYT4KICAgICAgICAgICAgICAgIDwlIH0gJT4KICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgIDx0ZD4KICAgICAgICAgICAgICAgIDwlPSByLlBhdGhOYW1lICU+CiAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICA8dGQ+PGNvZGU+PCU9IHIuSGFuZGxlck5hbWUgJT48L2NvZGU+PC90ZD4KICAgICAgICAgICAgPC90cj4KICAgICAgICAgIDwlIH0gJT4KCiAgICAgICAgPC90Ym9keT4KICAgICAgPC90YWJsZT4KICAgIDwvZGl2PgogIDwvZGl2Pgo8L2Rpdj4KPGRpdiBjbGFzcz0iZm9vdCI+IDxzcGFuPiBQb3dlcmVkIGJ5IDxhIGhyZWY9Imh0dHA6Ly9nb2J1ZmZhbG8uaW8vIj5nb2J1ZmZhbG8uaW88L2E+PC9zcGFuPiA8L2Rpdj4K\"") + packr.PackJSONBytes("../newapp/templates", "templates/application.html.tmpl", "\"PCFET0NUWVBFIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCwgaW5pdGlhbC1zY2FsZT0xIj4KICAgIDxtZXRhIGNoYXJzZXQ9InV0Zi04Ij4KICAgIDx0aXRsZT5CdWZmYWxvIC0ge3sgLm9wdHMuTmFtZS5UaXRsZSB9fTwvdGl0bGU+CiAge3stIGlmIG5vdCAub3B0cy5XaXRoV2VicGFjayB9fQogICAge3stIGlmIGVxIC5vcHRzLkJvb3RzdHJhcCAzIH19CiAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vbWF4Y2RuLmJvb3RzdHJhcGNkbi5jb20vYm9vdHN0cmFwLzMuMy43L2Nzcy9ib290c3RyYXAubWluLmNzcyIgaW50ZWdyaXR5PSJzaGEzODQtQlZZaWlTSUZlSzFkR21KUkFreWN1SEFIUmczMk9tVWN3dzdvbjNSWWRnNFZhK1BtU1Rzei9LNjh2YmRFamg0dSIgY3Jvc3NvcmlnaW49ImFub255bW91cyI+CiAgICB7ey0gZWxzZSB9fQogICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL3N0YWNrcGF0aC5ib290c3RyYXBjZG4uY29tL2Jvb3RzdHJhcC80LjEuMC9jc3MvYm9vdHN0cmFwLm1pbi5jc3MiIGludGVncml0eT0ic2hhMzg0LTlnVlE0ZFlGd3dXU2pJRFpuTEVXbnhDamVTV0ZwaEppd0dQWHIxamRkSWhPZWdpdTFGd081cVJHdkZYT2RKWjQiIGNyb3Nzb3JpZ2luPSJhbm9ueW1vdXMiPgogICAge3stIGVuZCB9fQogICAgCiAgICA8JT0gc3R5bGVzaGVldFRhZygiYnVmZmFsby5jc3MiKSAlPgogIHt7LSBlbmQgfX0KICAgIDwlPSBzdHlsZXNoZWV0VGFnKCJhcHBsaWNhdGlvbi5jc3MiKSAlPgogICAgPG1ldGEgbmFtZT0iY3NyZi1wYXJhbSIgY29udGVudD0iYXV0aGVudGljaXR5X3Rva2VuIiAvPgogICAgPG1ldGEgbmFtZT0iY3NyZi10b2tlbiIgY29udGVudD0iPCU9IGF1dGhlbnRpY2l0eV90b2tlbiAlPiIgLz4KICAgIDxsaW5rIHJlbD0iaWNvbiIgaHJlZj0iPCU9IGFzc2V0UGF0aCgiaW1hZ2VzL2Zhdmljb24uaWNvIikgJT4iPgogIDwvaGVhZD4KICA8Ym9keT4KCiAgICA8ZGl2IGNsYXNzPSJjb250YWluZXIiPgogICAgICA8JT0gcGFydGlhbCgiZmxhc2guaHRtbCIpICU+CiAgICAgIDwlPSB5aWVsZCAlPgogICAgPC9kaXY+CgogICAgPCU9IGphdmFzY3JpcHRUYWcoImFwcGxpY2F0aW9uLmpzIikgJT4KICA8L2JvZHk+CjwvaHRtbD4K\"") + packr.PackJSONBytes("../newapp/templates", "templates/index.html.tmpl", "\"PGhlYWRlcj4KICA8ZGl2IGNsYXNzPSJjb250YWluZXIiPgogICAgPGRpdiBjbGFzcz0icm93Ij4KICAgICAgPGRpdiBjbGFzcz0iY29sLW1kLTEgY29sLXNtLTIgY29sLX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Utc3RyaXBlZCI+CiAgICAgICAgPHRoZWFkPgogICAgICAgICAgPHRyIHRleHQtYWxpZ249ImxlZnQiPgogICAgICAgICAgICA8dGggY2xhc3M9ImNlbnRlcmVkIj5NRVRIT0Q8L3RoPgogICAgICAgICAgICA8dGg+UEFUSDwvdGg+CiAgICAgICAgICAgIDx0aD5OQU1FPC90aD4KICAgICAgICAgICAgPHRoPkhBTkRMRVI8L3RoPgogICAgICAgICAgPC90cj4KICAgICAgICA8L3RoZWFkPgogICAgICAgIDx0Ym9keT4KCiAgICAgICAgICA8JT0gZm9yIChyKSBpbiByb3V0ZXMgeyAlPgogICAgICAgICAgICA8dHI+CiAgICAgICAgICAgICAgPHRkIGNsYXNzPSJjZW50ZXJlZCI+CiAgICAgICAgICAgICAgICA8JT0gci5NZXRob2QgJT4KICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgIDx0ZD4KICAgICAgICAgICAgICAgIDwlPSBpZiAoci5NZXRob2QgIT0gIkdFVCIgfHwgci5QYXRoIH49ICJ7IikgeyAlPgogICAgICAgICAgICAgICAgICA8JT0gci5QYXRoICU+CiAgICAgICAgICAgICAgICA8JSB9IGVsc2UgeyAlPgogICAgICAgICAgICAgICAgICA8YSBocmVmPSI8JT0gci5QYXRoICU+Ij48JT0gci5QYXRoICU+PC9hPgogICAgICAgICAgICAgICAgPCUgfSAlPgogICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgPHRkPgogICAgICAgICAgICAgICAgPCU9IHIuUGF0aE5hbWUgJT4KICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgIDx0ZD48Y29kZT48JT0gci5IYW5kbGVyTmFtZSAlPjwvY29kZT48L3RkPgogICAgICAgICAgICA8L3RyPgogICAgICAgICAgPCUgfSAlPgoKICAgICAgICA8L3Rib2R5PgogICAgICA8L3RhYmxlPgogICAgPC9kaXY+CiAgPC9kaXY+CjwvZGl2Pgo8ZGl2IGNsYXNzPSJmb290Ij4gPHNwYW4+IFBvd2VyZWQgYnkgPGEgaHJlZj0iaHR0cDovL2dvYnVmZmFsby5pby8iPmdvYnVmZmFsby5pbzwvYT48L3NwYW4+IDwvZGl2Pgo=\"") } diff --git a/go.mod b/go.mod index 8fdb8117c..aa751eaaf 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ 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-20180903200018-2bc46821cfb0 + github.com/gobuffalo/buffalo-plugins v0.0.0-20180904210015-930e42a2d09e github.com/gobuffalo/buffalo-pop v0.0.0-20180903202525-9c42d20c7ebb github.com/gobuffalo/envy v1.6.4 github.com/gobuffalo/github_flavored_markdown v1.0.0 @@ -21,7 +21,7 @@ require ( github.com/gobuffalo/packr v1.13.3 github.com/gobuffalo/plush v3.7.16+incompatible github.com/gobuffalo/pop v4.7.2+incompatible - github.com/gobuffalo/shoulders v0.0.0-20180815165021-5569039eac2f + github.com/gobuffalo/release v1.0.5 // indirect github.com/gobuffalo/tags v2.0.10+incompatible github.com/gobuffalo/x v0.0.0-20180816203319-dc54d929c4a2 github.com/gorilla/context v1.1.1 @@ -39,8 +39,8 @@ require ( github.com/spf13/pflag v1.0.2 github.com/spf13/viper v1.1.0 github.com/stretchr/testify v1.2.2 - golang.org/x/crypto v0.0.0-20180830192347-182538f80094 + golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f - golang.org/x/tools v0.0.0-20180831211245-7ca132754999 + golang.org/x/tools v0.0.0-20180904205237-0aa4b8830f48 gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4 ) diff --git a/go.sum b/go.sum index 06de51094..352f874a5 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,8 @@ dmitri.shuralyov.com/text/kebabcase v0.0.0-20180217051803-40e40b42552a/go.mod h1:3YpR/7A6nvWHA/oFH66Hp/dJ5A2gM63I3xkA/3FV6tY= github.com/BurntSushi/toml v0.3.0 h1:e1/Ivsx3Z0FVTV0NSOv/aVgbUWyQuzj7DDnFblkRvsY= github.com/BurntSushi/toml v0.3.0/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/ajg/form v0.0.0-20160802194845-cc2954064ec9/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f h1:zvClvFQwU++UpIUBGC8YmDlfhUrweEy1R1Fj1gu5iIM= github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= @@ -26,6 +28,8 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/gobuffalo/buffalo v0.12.6/go.mod h1:kp1qgfbzOQGfN+iXKPiVsKHXx16/XsnF9eB8nZawdEs= github.com/gobuffalo/buffalo-plugins v0.0.0-20180903200018-2bc46821cfb0 h1:AnfUbcM+2wkJrt/yEZMY1xeFIu2NGt7zRXD9WrWeZCM= github.com/gobuffalo/buffalo-plugins v0.0.0-20180903200018-2bc46821cfb0/go.mod h1:5xKUVgeV7Iyr6737gI8wsG86/6AG2CX3cPX9X+yUKTI= +github.com/gobuffalo/buffalo-plugins v0.0.0-20180904210015-930e42a2d09e h1:Qv0zqCmN4wTJsZKRlZnlgmffxapPRggRZMatOy40q9c= +github.com/gobuffalo/buffalo-plugins v0.0.0-20180904210015-930e42a2d09e/go.mod h1:LoWjREMrU6LeRKrRD1flNTSWCs1N7LFTti7PBnuAInY= github.com/gobuffalo/buffalo-pop v0.0.0-20180903202525-9c42d20c7ebb h1:Fo76MOkxOMmPJ0fjcNUaHZkamRznzctLkWaNYx6kr1E= github.com/gobuffalo/buffalo-pop v0.0.0-20180903202525-9c42d20c7ebb/go.mod h1:UUjv6wicG7muU3jtbwNap95rh0FOmV57TD1FYdNhNoM= github.com/gobuffalo/envy v1.6.3/go.mod h1:gOxUQY+OEwqH1a2m25Sqax1GIhj31tPNOIdFzj8QThs= @@ -38,6 +42,9 @@ github.com/gobuffalo/flect v0.0.0-20180902163941-e03d6ccf1b21 h1:JmUfiiw4i15P4hE github.com/gobuffalo/flect v0.0.0-20180902163941-e03d6ccf1b21/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= github.com/gobuffalo/genny v0.0.0-20180903175302-8e6ecd7c52ca h1:f/KGlUPNYarxLFHsOIxAKprqYlKI/1f5VgvKM8xDvSw= github.com/gobuffalo/genny v0.0.0-20180903175302-8e6ecd7c52ca/go.mod h1:aVNB6Ezqcz9wSQrIHUETaixCNCYnBaErXJ3K+StO15g= +github.com/gobuffalo/genny v0.0.0-20180904205547-2835d3b30de9/go.mod h1:CX+ymPzTO0Ti5qRyCFdtu78AncVEQ5QVe5cEeqMURJs= +github.com/gobuffalo/genny v0.0.0-20180904214332-b7dcbfc7ea0a h1:LozjeWkCQ2gCbSGtXyGNuWVfjlDTHv3yT+XkImvXyIg= +github.com/gobuffalo/genny v0.0.0-20180904214332-b7dcbfc7ea0a/go.mod h1:CX+ymPzTO0Ti5qRyCFdtu78AncVEQ5QVe5cEeqMURJs= github.com/gobuffalo/github_flavored_markdown v1.0.0 h1:e2dK+SoHgOc/vfXuYMdXwEg2vAUlFzp8SBRwTOXckQ0= github.com/gobuffalo/github_flavored_markdown v1.0.0/go.mod h1:c8/8gRnd6MSyyk+fp6E8O8cUTHd7P2cnDnH4G7o91l0= github.com/gobuffalo/httptest v1.0.1 h1:F7KibLzHAHy1UZVpqwcd95aKcoI3gbSj7FgkDZ9lHow= @@ -70,8 +77,11 @@ github.com/gobuffalo/plush v3.7.16+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5s github.com/gobuffalo/pop v0.0.0-20180810203029-9f8bf0c11920/go.mod h1:rYdFIDMO4v9I4SK6BQ3q+vnd5HlQnTtlY/ANF7wKzGM= github.com/gobuffalo/pop v4.7.2+incompatible h1:egmMM0F0ypkZG2L1L2G315By8gwIsuj5eeGXO9uJCHY= github.com/gobuffalo/pop v4.7.2+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/shoulders v0.0.0-20180815165021-5569039eac2f h1:FdNwdqDxs4t4GKKS1yG3krQRVWSmJ9tntDhm69wfVq4= -github.com/gobuffalo/shoulders v0.0.0-20180815165021-5569039eac2f/go.mod h1:6BOi9bQ44FOef+BnbjTps9APr8fZE1Yvcs4BdeY940U= +github.com/gobuffalo/release v1.0.2/go.mod h1:xTrXdNp8DBGFkCITk3OY6pf3YWWoUoDKYPw8FhRjNFE= +github.com/gobuffalo/release v1.0.5 h1:TPj0JGY6J7UMmrN98OJi/1rGVGgGFG/V1T1KmSA6/c0= +github.com/gobuffalo/release v1.0.5/go.mod h1:fJfvbgm624b3lCuMeK5w0E9t06dd4EHlUlzSv0icJHA= +github.com/gobuffalo/shoulders v0.0.0-20180904151418-9cac5899ceee h1:EkfcVBC4WGCgesY08+9NqPWUiUfFo/jJIqpcANMiEpE= +github.com/gobuffalo/shoulders v0.0.0-20180904151418-9cac5899ceee/go.mod h1:atyzRdR+uoOgsuA3AL82yYx5yJ4vONfDYtQXZCuT9TI= github.com/gobuffalo/tags v2.0.6+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= github.com/gobuffalo/tags v2.0.10+incompatible h1:gLcbJPHlzAiuZVsxDvTSwoXz/vJmNjgelxP5zrADb9o= github.com/gobuffalo/tags v2.0.10+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= @@ -220,6 +230,8 @@ github.com/unrolled/secure v0.0.0-20180618144512-8287f3899c8e/go.mod h1:mnPT77IA golang.org/x/crypto v0.0.0-20180808211826-de0752318171/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180830192347-182538f80094 h1:rVTAlhYa4+lCfNxmAIEOGQRoD23UqP72M3+rSWVGDTg= golang.org/x/crypto v0.0.0-20180830192347-182538f80094/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/net v0.0.0-20180801234040-f4c29de78a2a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180808004115-f9ce57c11b24/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -235,10 +247,14 @@ golang.org/x/sys v0.0.0-20180903171548-1b7396714020 h1:K7dXUB1Deu0S6Qwu+r8ed4/Zy golang.org/x/sys v0.0.0-20180903171548-1b7396714020/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180903190138-2b024373dcd9 h1:lkiLiLBHGoH3XnqSLUIaBsilGMUjI+Uy2Xu2JLUtTas= golang.org/x/sys v0.0.0-20180903190138-2b024373dcd9/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20180831211245-7ca132754999 h1:mf2VYfMpSMTlp0I/UXrX13w5LejDx34QeUUHH4TrUA8= golang.org/x/tools v0.0.0-20180831211245-7ca132754999/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180904205237-0aa4b8830f48 h1:PIz+xUHW4G/jqfFWeKhQ96ZV/t2HDsXfWj923rV0bZY= +golang.org/x/tools v0.0.0-20180904205237-0aa4b8830f48/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo= diff --git a/grifts/internal/release/release.go b/grifts/internal/release/release.go deleted file mode 100644 index 9ccec6242..000000000 --- a/grifts/internal/release/release.go +++ /dev/null @@ -1,157 +0,0 @@ -package release - -import ( - "fmt" - "io/ioutil" - "log" - "os" - "os/exec" - "path/filepath" - "regexp" - "strings" - - "github.com/pkg/errors" -) - -type Runner struct { - Name string - Fn func() error -} - -type Manager struct { - Version string - Runners []Runner -} - -func (m *Manager) Add(r Runner) { - m.Runners = append(m.Runners, r) -} - -func (m Manager) Run() error { - for _, r := range m.Runners { - fmt.Println(r.Name) - if err := r.Fn(); err != nil { - return errors.Wrapf(err, "releaser runner %s failed", r.Name) - } - } - return nil -} - -func New(version string) (*Manager, error) { - version = strings.TrimSpace(version) - if version == "" { - return nil, errors.New("version can not be empty") - } - return &Manager{ - Version: version, - Runners: []Runner{}, - }, nil -} - -func CurrentBranch() (string, error) { - cmd := exec.Command("git", "symbolic-ref", "--short", "HEAD") - b, err := cmd.CombinedOutput() - return string(b), err -} - -func InBranch(name string, fn func() error) Runner { - f := func() error { - cur, err := CurrentBranch() - if err != nil { - return errors.WithStack(err) - } - defer func() { - if err := Command("git", "checkout", cur).Fn(); err != nil { - log.Fatal(err) - } - }() - if err := Command("git", "checkout", name).Fn(); err != nil { - return errors.WithStack(err) - } - return fn() - } - return Runner{ - Name: "git branch: " + name, - Fn: f, - } -} - -func TagRelease(branch string, version string) (Runner, error) { - r := Runner{ - Name: fmt.Sprintf("tag %s as %s", branch, version), - } - m, err := New(version) - if err != nil { - return r, errors.WithStack(err) - } - m.Add(Command("git", "tag", version)) - m.Add(Command("git", "push", "origin", branch)) - m.Add(Command("git", "push", "origin", "--tags")) - r.Fn = m.Run - return r, nil -} - -func PackAndCommit() (Runner, error) { - r := Runner{Name: "packr"} - m, err := New("n/a") - if err != nil { - return r, errors.WithStack(err) - } - m.Add(Command("packr")) - m.Add(Command("git", "add", "**/*-packr.go")) - m.Add(Command("git", "commit", "**/*-packr.go", "-m", "committed packr files")) - r.Fn = m.Run - return r, nil -} - -func UnpackAndCommit() (Runner, error) { - r := Runner{Name: "packr"} - m, err := New("n/a") - if err != nil { - return r, errors.WithStack(err) - } - m.Add(Command("packr", "clean")) - m.Add(Command("git", "add", "**/*-packr.go")) - m.Add(Command("git", "commit", "**/*-packr.go", "-m", "deleted packr files")) - r.Fn = m.Run - return r, nil -} - -func Command(name string, args ...string) Runner { - cmd := exec.Command(name, args...) - cmd.Stdin = os.Stdin - cmd.Stderr = os.Stderr - cmd.Stdout = os.Stdout - - r := Runner{ - Name: strings.Join(cmd.Args, " "), - Fn: cmd.Run, - } - return r -} - -func FindVersion(path string) (string, error) { - pwd, err := os.Getwd() - if err != nil { - return "", err - } - vfile, err := ioutil.ReadFile(filepath.Join(pwd, path)) - if err != nil { - return "", err - } - - //var Version = "v0.4.0" - re := regexp.MustCompile(`const Version = "(.+)"`) - matches := re.FindStringSubmatch(string(vfile)) - if len(matches) < 2 { - return "", errors.New("failed to find the version") - } - v := matches[1] - if strings.Contains(v, "dev") { - return "", errors.Errorf("version can not be a dev version %s", v) - } - if !strings.HasPrefix(v, "v") { - return "", errors.Errorf("version must match format `v0.0.0`: %s", v) - } - return v, nil -} diff --git a/grifts/release.go b/grifts/release.go deleted file mode 100644 index 689e782d6..000000000 --- a/grifts/release.go +++ /dev/null @@ -1,70 +0,0 @@ -package grifts - -import ( - "strings" - - "github.com/gobuffalo/buffalo/grifts/internal/release" - "github.com/markbates/grift/grift" - "github.com/pkg/errors" -) - -var _ = grift.Desc("release", "Generates a CHANGELOG and creates a new GitHub release based on what is in the version.go file.") -var _ = grift.Add("release", func(c *grift.Context) error { - - v, err := release.FindVersion("runtime/version.go") - if err != nil { - return err - } - - rr, err := release.New(v) - if err != nil { - return err - } - - rr.Add(release.InBranch("master", func() error { - m, err := release.New(v) - if err != nil { - return errors.WithStack(err) - } - m.Add(release.Command("make", "install")) - m.Add(release.Command("make", "ci-test")) - m.Add(release.Runner{ - Name: "grift shoulders", - Fn: func() error { - return grift.Run("shoulders", c) - }, - }) - p, err := release.PackAndCommit() - if err != nil { - if !strings.Contains(err.Error(), "nothing to commit, working tree clean") { - return errors.WithStack(err) - } - } - m.Add(p) - - tr, err := release.TagRelease("master", v) - if err != nil { - return errors.WithStack(err) - } - m.Add(tr) - m.Add(release.Command("bash", "'goreleaser --rm-dist'")) - - m.Add(release.Command("git", "branch", "-D", "development")) - m.Add(release.Command("git", "branch", "development")) - return m.Run() - })) - - rr.Add(release.InBranch("development", func() error { - m, err := release.New("development") - if err != nil { - return errors.WithStack(err) - } - p, err := release.UnpackAndCommit() - if err != nil { - return errors.WithStack(err) - } - m.Add(p) - return m.Run() - })) - return rr.Run() -}) diff --git a/grifts/shoulders.go b/grifts/shoulders.go deleted file mode 100755 index 035a727fe..000000000 --- a/grifts/shoulders.go +++ /dev/null @@ -1,61 +0,0 @@ -package grifts - -import ( - "os" - "os/exec" - "path" - "strings" - - "github.com/gobuffalo/envy" - "github.com/gobuffalo/shoulders/shoulders" - "github.com/markbates/grift/grift" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" -) - -var _ = grift.Desc("shoulders", "Prints a listing all of the 3rd party packages used by buffalo.") -var _ = grift.Add("shoulders:list", func(c *grift.Context) error { - view, err := shoulders.New() - if err != nil { - return errors.WithStack(err) - } - logrus.Infof(strings.Join(view.Deps, "\n")) - return nil -}) - -var _ = grift.Desc("shoulders", "Generates a file listing all of the 3rd party packages used by buffalo.") -var _ = grift.Add("shoulders", func(c *grift.Context) error { - view, err := shoulders.New() - view.Name = "Buffalo" - if err != nil { - return errors.WithStack(err) - } - - f, err := os.Create(path.Join(envy.GoPath(), "src", "github.com", "gobuffalo", "buffalo", "SHOULDERS.md")) - if err != nil { - return err - } - - if err := view.Write(f); err != nil { - return err - } - - return commitAndPushShoulders() -}) - -func commitAndPushShoulders() error { - cmd := exec.Command("git", "commit", "SHOULDERS.md", "-m", "Updated SHOULDERS.md") - cmd.Stdin = os.Stdin - cmd.Stderr = os.Stderr - cmd.Stdout = os.Stdout - err := cmd.Run() - if err != nil { - return err - } - - cmd = exec.Command("git", "push", "origin") - cmd.Stdin = os.Stdin - cmd.Stderr = os.Stderr - cmd.Stdout = os.Stdout - return cmd.Run() -} diff --git a/runtime/version.go b/runtime/version.go index 2401ed202..42cff956c 100644 --- a/runtime/version.go +++ b/runtime/version.go @@ -1,7 +1,4 @@ package runtime -// Version is the current version of the buffalo binary -// const Version = "v0.12.6" - // Version is the current version of the buffalo binary const Version = "development"