Skip to content

Commit

Permalink
Upgrade Go to version 1.11 and enable Go modules
Browse files Browse the repository at this point in the history
Removes Glide as a module manager
  • Loading branch information
mraerino committed Nov 14, 2018
1 parent d67840a commit 2cf516d
Show file tree
Hide file tree
Showing 8 changed files with 192 additions and 327 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
language: go

go:
- "1.9"
- "1.11"

env:
global:
- GO111MODULE=on

install: make deps
script: make all
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM netlify/go-glide:v0.12.3
FROM golang:1.11

ADD . /go/src/github.com/netlify/gocommerce
RUN useradd -m netlify

RUN useradd -m netlify && cd /go/src/github.com/netlify/gocommerce && make deps build_linux && mv gocommerce /usr/local/bin/
ADD . /src
RUN cd /src && make deps build_linux && mv gocommerce /usr/local/bin/

USER netlify
CMD ["gocommerce"]
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ release: ## Upload release to GitHub releases.

deps: ## Install dependencies.
@go get -u golang.org/x/lint/golint
@go get -u github.com/Masterminds/glide && glide install
@go mod download

image: ## Build the Docker image.
docker build .
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ The easiest way to use GoCommerce is with [commerce-js](https://github.com/netli

## Running the GoCommerce backend

GoCommerce can be deployed to any server environment that runs Go. The button below provides a quick way to get started by running on Heroku:
GoCommerce can be deployed to any server environment that runs Go. Minimum requirement for Go is version 1.11 since GoCommerce is using Go modules.

The button below provides a quick way to get started by running on Heroku:

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/netlify/gocommerce)

Expand Down
266 changes: 0 additions & 266 deletions glide.lock

This file was deleted.

55 changes: 0 additions & 55 deletions glide.yaml

This file was deleted.

Loading

0 comments on commit 2cf516d

Please sign in to comment.