diff --git a/.dockerignore b/.dockerignore index ca4fe73..ec7b49e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,5 @@ vendor/pkg vendor/src pkg -hooks bin .git diff --git a/Dockerfile b/Dockerfile index 9761d79..7cf4d32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,16 @@ # Build go-neb FROM golang:1.10-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 +RUN /tmp/go-neb/hooks/pre-commit # Run go-neb FROM alpine:3.7 diff --git a/hooks/pre-commit b/hooks/pre-commit index cc0e2f0..cb9cd87 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -1,4 +1,4 @@ -#! /bin/bash +#!/bin/sh set -eu