Skip to content

Commit

Permalink
build: Go 1.11 + go modules
Browse files Browse the repository at this point in the history
- Update Docker build also
  • Loading branch information
jhillyerd committed Oct 20, 2018
1 parent 2f6f557 commit 1e3ae34
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Expand Up @@ -31,7 +31,7 @@ archive:
- LICENSE*
- README*
- CHANGELOG*
fpm:
nfpm:
bindir: /usr/local/bin
snapshot:
name_template: SNAPSHOT-{{ .Commit }}
Expand Down
7 changes: 4 additions & 3 deletions .travis.yml
Expand Up @@ -2,14 +2,15 @@ language: go
sudo: false

env:
- DEPLOY_WITH_MAJOR="1.9"
global:
- GO111MODULE=on
- DEPLOY_WITH_MAJOR="1.11"

before_script:
- go vet ./...

go:
- 1.8.x
- 1.9.x
- "1.11.x"

script: go test -race -v ./...

Expand Down
13 changes: 6 additions & 7 deletions Dockerfile
Expand Up @@ -2,18 +2,17 @@
# https://github.com/jhillyerd/fauxmailer

# Build
FROM golang:1.9-alpine as builder
FROM golang:1.11-alpine3.8 as builder
RUN apk add --no-cache ca-certificates git
WORKDIR /go/src/github.com/jhillyerd/fauxmailer
WORKDIR /build
COPY . .
RUN go-wrapper download
RUN go-wrapper install
ENV CGO_ENABLED 0
RUN go build -o fauxmailer

# Run in minimal image
FROM alpine
RUN apk add --no-cache ca-certificates
FROM alpine:3.8
WORKDIR /usr/bin
COPY --from=builder /go/bin/fauxmailer .
COPY --from=builder /build/fauxmailer .

# Run
CMD ["fauxmailer"]
3 changes: 3 additions & 0 deletions go.mod
@@ -0,0 +1,3 @@
module github.com/jhillyerd/fauxmailer

require github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d
2 changes: 2 additions & 0 deletions go.sum
@@ -0,0 +1,2 @@
github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d h1:Zj+PHjnhRYWBK6RqCDBcAhLXoi3TzC27Zad/Vn+gnVQ=
github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d/go.mod h1:WZy8Q5coAB1zhY9AOBJP0O6J4BuDfbupUDavKY+I3+s=

0 comments on commit 1e3ae34

Please sign in to comment.