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

Commit

Permalink
update Dockerfile and Makefile; removed go.*
Browse files Browse the repository at this point in the history
  • Loading branch information
markbates committed Oct 3, 2018
1 parent ec0436e commit 7ce3e07
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 252 deletions.
14 changes: 6 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,21 @@ RUN rm $(which buffalo)
RUN rm -rf $BP
RUN mkdir -p $BP
WORKDIR $BP
ADD . .
COPY . .

RUN go get -v -t ./...
RUN make ci-deps
RUN make install

RUN go test -tags sqlite -race ./...
RUN go test -tags sqlite -coverprofile cover.out -covermode count ./...
RUN gometalinter --vendor --deadline=5m ./... --skip=internal

RUN go test -tags "sqlite integration_test" -race ./...
RUN go test -tags "sqlite integration_test" -coverprofile cover.out -covermode count ./...

RUN if [ -z "$CODECOV_TOKEN" ] ; then \
echo codecov not enabled ; \
else curl -s https://codecov.io/bash -o codecov && \
bash codecov -f cover.out -X fix; fi

RUN go get -u github.com/alecthomas/gometalinter
RUN gometalinter --install
RUN gometalinter --vendor --deadline=5m ./... --skip=internal

WORKDIR $GOPATH/src/

# START: tests bins are built with tags properly
Expand Down
53 changes: 39 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,50 @@
TAGS ?= "sqlite"
INSTALL ?= install -v -tags ${TAGS} ./...

GO_BIN ?= go
GO_GET ?= $(GO_BIN) get -tags "sqlite" -v -t github.com/gobuffalo/buffalo/...

ifeq ("$(GO_BIN)","vgo")
GO_GET = vgo version
endif
install:
packr
$(GO_BIN) install -tags ${TAGS} -v ./buffalo

deps:
$(GO_BIN) install -v github.com/gobuffalo/packr/packr
$(GO_BIN) get github.com/gobuffalo/release
$(GO_BIN) get github.com/gobuffalo/packr/packr
$(GO_BIN) get -tags ${TAGS} -t ./...
ifeq ($(GO111MODULE),on)
$(GO_BIN) mod tidy
endif

install: deps
build:
packr
$(GO_GET)
$(GO_BIN) $(INSTALL)
packr clean
$(GO_BIN) build -v .

test:
$(GO_BIN) test -vet off -tags ${TAGS} ./...
packr
$(GO_BIN) test -tags ${TAGS} ./...

ci-deps:
$(GO_BIN) get github.com/gobuffalo/packr/packr
$(GO_BIN) get -tags ${TAGS} -t -u -v ./...

ci-test:
$(GO_BIN) test -vet off -tags ${TAGS} -race -v ./...
docker build .
docker build . --no-cache

lint:
gometalinter --vendor ./... --deadline=1m --skip=internal

update:
$(GO_BIN) get -u -tags ${TAGS}
ifeq ($(GO111MODULE),on)
$(GO_BIN) mod tidy
endif
packr
make test
make install
ifeq ($(GO111MODULE),on)
$(GO_BIN) mod tidy
endif

release-test:
make test

release:
release -y -f ./runtime/version.go
77 changes: 0 additions & 77 deletions go.mod

This file was deleted.

Loading

0 comments on commit 7ce3e07

Please sign in to comment.