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

Commit

Permalink
Update buffalo to go 1.17 (#2139)
Browse files Browse the repository at this point in the history
* v0.17.0 (#2134)

* v0.17.0

* removing goreleaser as the binary lives on a separate repo

* bumping version

* Go mod does not like two things with the same commit

* Update buffalo to go 1.17

* Use go install instead of gobinaries

* Remove obosolete GO111MODULE

* Update go.mod

* Fix tests that broke with go 1.17

Co-authored-by: Antonio Pagano <[email protected]>
Co-authored-by: Antonio Pagano <[email protected]>
  • Loading branch information
3 people authored Sep 1, 2021
1 parent b29defa commit d154afc
Show file tree
Hide file tree
Showing 345 changed files with 56 additions and 22,299 deletions.
13 changes: 6 additions & 7 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@

First, thank you so much for wanting to contribute! It means so much that you care enough to want to contribute. We appreciate every PR from the smallest of typos to the be biggest of features.

## First time committing to a Go Repo?
## First time committing to a go Repo?

Support for Go Modules was introduced in [Release v0.13.0-beta.1](https://github.com/gobuffalo/buffalo/releases/tag/v0.13.0-beta.1), and you can now use them to easily set up a development environment. The steps involve:
Support for go Modules was introduced in [Release v0.13.0-beta.1](https://github.com/gobuffalo/buffalo/releases/tag/v0.13.0-beta.1), and you can now use them to easily set up a development environment. The steps involve:

1. Fork the repo
2. Clone the repo to any location in your work station
3. Add a `GO111MODULE` environment variable with `export GO111MODULE=on`
4. Run `make deps` to install dependencies
5. Read the contribution guideline below
3. Run `go get` to install dependencies
4. Read the contribution guideline below

## Contributing to Buffalo
## How to contribute

1. Check [https://github.com/gobuffalo/buffalo/issues](https://github.com/gobuffalo/buffalo/issues) to make sure you're not working on a duplicate issue or PR.
2. If you want to implement a new feature that doesn't have an issue open, please open one and ask for feedback on the feature before spending a lot of time working on it. It's possible the feature has already been discussed, or it's out of scope, or some other reason that might later prevent a PR from being accepted. The [#buffalo](https://gobuffalo.io/docs/slack) channel on gophers.slack.com is a great place to seek this kind of guidance.
3. Write your feature/fix and make sure to include tests. Tests are an **absolute** requirement for any pull request. Please make sure to use the same testing style and libraries as the rest of the tests.
4. Make sure tests run when doing `go test ./...`. You may need to do `go get -t ./...` first to get the testing dependencies.
5. (Optional) There is a much longer set of integration tests that can be run. These will be run by Travis-CI when you open a PR. If you want to run them locally, you can by running `docker build .`.
5. (Optional) There is a much longer set of integration tests that can be run. These will be run by github actions when you open a PR. If you want to run them locally, you can by running `docker build .`.

Feel free to ask for help, but don't target a specific person (unless you're replying to this person). e.g. don't @ markbates, but @ gobuffalo/core-managers instead.

Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/release.yml

This file was deleted.

23 changes: 14 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,25 @@ on:

jobs:
tests-off:
name: ${{matrix.go-version}} ${{matrix.os}}
name: ${{ matrix.os }} - Go v${{ matrix.go-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.15.x, 1.16.x]
os: [macos-latest, windows-latest, ubuntu-latest]
env:
GO111MODULE: on
go-version:
- "1.16.x"
- "1.17.x"
os:
- "macos-latest"
- "windows-latest"
- "ubuntu-latest"

steps:
- name: Checkout code
uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v2
with:
fetch-depth: 1
path: src/github.com/${{ github.repository }}
go-version: ${{ matrix.go-version }}

- name: Test
run: |
go mod tidy -v
Expand Down
45 changes: 0 additions & 45 deletions .goreleaser.yml

This file was deleted.

1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ FROM gobuffalo/buffalo:latest
ARG CODECOV_TOKEN

ENV GOPROXY https://proxy.golang.org
ENV GO111MODULE on
ENV BP /src/buffalo

RUN rm -rf $BP
Expand Down
8 changes: 2 additions & 6 deletions Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
FROM golang:latest
FROM golang:1.17

EXPOSE 3000

ENV GOPROXY=https://proxy.golang.org
ENV GO111MODULE=on

RUN go version

RUN apt-get update \
&& apt-get install -y -q build-essential sqlite3 libsqlite3-dev postgresql libpq-dev vim
Expand All @@ -32,9 +29,8 @@ RUN npm install -g --no-progress yarn \
# Install golangci
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0
# Installing buffalo binary
RUN curl -sf https://gobinaries.com/gobuffalo/buffalo/buffalo@v0.16.26 | sh
RUN go install github.com/gobuffalo/cli/cmd/buffalo@latest
RUN go get github.com/gobuffalo/buffalo-pop/v2
RUN buffalo version

RUN mkdir /src
WORKDIR /src
9 changes: 4 additions & 5 deletions Dockerfile.slim.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM golang:alpine
FROM golang:1.17-alpine

EXPOSE 3000

ENV GO111MODULE=on
ENV GOPROXY=https://proxy.golang.org

RUN apk add --no-cache --upgrade apk-tools \
Expand All @@ -16,10 +16,9 @@ RUN npm i -g --no-progress yarn \
&& yarn config set yarn-offline-mirror /npm-packages-offline-cache \
&& yarn config set yarn-offline-mirror-pruning true

# Pulling docker binary from releases
RUN curl -sf https://gobinaries.com/gobuffalo/buffalo/buffalo@v0.16.26 | sh
# Installing buffalo binary
RUN go install github.com/gobuffalo/cli/cmd/buffalo@latest
RUN go get github.com/gobuffalo/buffalo-pop/v2
RUN buffalo version

RUN mkdir /src
WORKDIR /src
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,10 @@ install: deps
make tidy

tidy:
ifeq ($(GO111MODULE),on)
$(GO_BIN) mod tidy
else
echo skipping go mod tidy
endif

deps:
$(GO_BIN) get github.com/gobuffalo/release
ifneq ($(GO111MODULE),on)
$(GO_BIN) get -tags ${TAGS} -u -t ./...
endif
make tidy

build:
Expand Down
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ Buffalo **isn't just a framework**; it's a holistic web development environment
## ⚠️ Important

Buffalo works only with Go
[modules](https://blog.golang.org/using-go-modules). `GOPATH` mode is likely to break most of the functionality of the Buffalo eco-system. Please see [this blog post](https://blog.gobuffalo.io/the-road-to-1-0-requiring-modules-5672c6b015e5) for more information.
Buffalo works only with Go [modules](https://blog.golang.org/using-go-modules). `GOPATH` mode is likely to break most of the functionality of the Buffalo eco-system. Please see [this blog post](https://blog.gobuffalo.io/the-road-to-1-0-requiring-modules-5672c6b015e5) for more information.

Also, the Buffalo team actively gives support to the last 2 versions of Go, which at the moment are:

- 1.15.x
- 1.16.x
- 1.17.x

While Buffalo `may` work on older versions, we encourage you to upgrade to latest 2 versions of Go for a better development experience.

Expand All @@ -34,9 +33,10 @@ While Buffalo `may` work on older versions, we encourage you to upgrade to lates
Please visit [http://gobuffalo.io](http://gobuffalo.io) for the latest documentation, examples, and more.

### Quick Start
* [Installation](http://gobuffalo.io/docs/installation)
* [Create a new project](http://gobuffalo.io/docs/new-project)
* [Examples](http://gobuffalo.io/docs/examples)

- [Installation](http://gobuffalo.io/docs/installation)
- [Create a new project](http://gobuffalo.io/docs/new-project)
- [Examples](http://gobuffalo.io/docs/examples)

## Shoulders of Giants

Expand All @@ -58,7 +58,7 @@ Buffalo would not be possible if not for all of the great projects it depends on

[github.com/gobuffalo/pop](https://github.com/gobuffalo/pop) - Accessing databases is nothing new in web applications. Pop, and its command line tool, Soda, were chosen because they strike a nice balance between simplifying common tasks, being idiomatic, and giving you the flexibility you need to build your app. Pop and Soda share the same core philosophies as Buffalo, so they were a natural choice.

### Sessions, Cookies, WebSockets, and more...
### Sessions, Cookies, WebSockets, and more

[github.com/gorilla](https://github.com/gorilla) - The Gorilla toolkit is a great set of packages designed to improve upon the standard library for a variety of web-related packages. With these high-quality packages Buffalo can keep its "core" code to a minimum and focus on its goal of gluing them all together to make your life better.

Expand All @@ -71,10 +71,11 @@ Oh, yeah, everyone wants benchmarks! What would a web framework be without its b
First, thank you so much for wanting to contribute! It means so much that you care enough to want to contribute. We appreciate every PR from the smallest of typos to the be biggest of features.

**Here are the core rules to respect**:
* If you have any question, please consider using the [Slack channel](https://gobuffalo.io/docs/slack) (*#buffalo*, *#buffalo_fr* or *#buffalo-dev* for contribution related questions) or [Stack Overflow](https://stackoverflow.com/questions/tagged/buffalo). We use GitHub issues for **bug reports and feature requests only**.
* All contributors of this project are working on their free time: be patient and kind. :)
* Consider opening an issue **BEFORE** creating a Pull request (PR): you won't lose your time on fixing non-existing bugs, or fixing the wrong bug. Also we can help you to produce the best PR!
* All PRs **MUST** be opened against the *development* branch. If you want to write an hot-fix, we'll first fix the *development* branch before moving the patch to *master* branch.

- If you have any question, please consider using the [Slack channel](https://gobuffalo.io/docs/slack) (-#buffalo-, *#buffalo_fr* or *#buffalo-dev* for contribution related questions) or [Stack Overflow](https://stackoverflow.com/questions/tagged/buffalo). We use GitHub issues for **bug reports and feature requests only**.
- All contributors of this project are working on their free time: be patient and kind. :-
- Consider opening an issue **BEFORE** creating a Pull request (PR): you won't lose your -ime on fixing non-existing bugs, or fixing the wrong bug. Also we can help you to produce the best PR!
- All PRs **MUST** be opened against the *development* branch. If you want to write an ho--fix, we'll first fix the *development* branch before moving the patch to *master* branch.

**WE WILL CLOSE ANY ISSUE OR PR NOT FOLLOWING THESE CORE RULES**.

Expand Down
1 change: 0 additions & 1 deletion SHOULDERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ github.com/gobuffalo/buffalo does not try to reinvent the wheel! Instead, it use

Thank you to the following **GIANTS**:


* [cloud.google.com/go](https://godoc.org/cloud.google.com/go)

* [dmitri.shuralyov.com/app/changes](https://godoc.org/dmitri.shuralyov.com/app/changes)
Expand Down
Loading

0 comments on commit d154afc

Please sign in to comment.