Browse Source

Update build process

Move to go 11
Ensure we lint as part of docker build.
forest-feature-rebase
Michael Kaye 3 years ago
parent
commit
27f21740c4
  1. 1
      .dockerignore
  2. 2
      .travis.yml
  3. 11
      Dockerfile
  4. 2
      hooks/pre-commit

1
.dockerignore

@ -1,6 +1,5 @@
vendor/pkg
vendor/src
pkg
hooks
bin
.git

2
.travis.yml

@ -1,6 +1,6 @@
language: go
go:
- 1.7
- 1.11
install:
- go get github.com/constabulary/gb/...
- go get github.com/golang/lint/golint

11
Dockerfile

@ -1,13 +1,18 @@
# Build go-neb
FROM golang:1.10-alpine as builder
FROM golang:1.11-alpine as builder
RUN apk add --no-cache -t build-deps git gcc musl-dev go
COPY . /tmp/go-neb
WORKDIR /tmp/go-neb
RUN apk add --no-cache -t build-deps git gcc musl-dev go \
&& go get -u github.com/constabulary/gb/... \
RUN go get -u github.com/constabulary/gb/... \
&& go get github.com/golang/lint/golint \
&& go get github.com/fzipp/gocyclo \
&& gb vendor restore \
&& gb build -f github.com/matrix-org/go-neb
# Ensures we're lint-free
RUN /tmp/go-neb/hooks/pre-commit
# Run go-neb
FROM alpine:3.7

2
hooks/pre-commit

@ -1,4 +1,4 @@
#! /bin/bash
#!/bin/sh
set -eu

Loading…
Cancel
Save