filebrowser/.circleci/config.yml
Equim 5eb9e95720 chore: use dep to manage vendor (#364)
Former-commit-id: a5262bb5a3ca329e8d9d7f68bbcd932bcd4f5aa0 [formerly 38cda564a25a09a12a849a5ac756b55e895d8ac7] [formerly b70c0cf897f19e468259148fc75e9a60de5252ab [formerly a184b775b3]]
Former-commit-id: 1de8ed7a5b316b7a64cad814c0efc80b67a9668f [formerly 5ef584fce122832b7e9200e6a7c6259a2b0e3c09]
Former-commit-id: 7e11fda1d06bd57d16a03a17d7c3a644e46c451a
2018-02-25 08:55:48 +00:00

84 lines
2.3 KiB
YAML

version: 2
jobs:
linting:
docker:
- image: circleci/golang:1.10
working_directory: /go/src/github.com/filebrowser/filebrowser
steps:
- checkout
- run:
name: Install Dependencies
command: |
curl -sL -o $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64
chmod +x $GOPATH/bin/dep
dep ensure -v
go get github.com/alecthomas/gometalinter
gometalinter --install
- run:
name: Run linting
command: |
gometalinter --exclude="rice-box.go" \
--deadline=300s \
-D goconst \
-D gocyclo \
-D vetshadow \
-D errcheck \
-D golint \
-D gas
build:
docker:
- image: circleci/golang:1.10
working_directory: /go/src/github.com/filebrowser/filebrowser
steps:
- checkout
- run:
name: Install Dependencies
command: |
curl -sL -o $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64
chmod +x $GOPATH/bin/dep
dep ensure -v
- run:
name: Building
command: go build github.com/filebrowser/filebrowser/cmd/filebrowser
deploy:
docker:
- image: circleci/golang:1.10
working_directory: /go/src/github.com/filebrowser/filebrowser
steps:
- checkout
- run:
name: Install Dependencies
command: |
curl -sL -o $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64
chmod +x $GOPATH/bin/dep
dep ensure -v
- run:
name: Deploy
command: curl -sL https://git.io/goreleaser | bash
workflows:
version: 2
lint-build-deploy:
jobs:
- linting:
filters:
tags:
only: /.*/
branches:
only: /.*/
- build:
filters:
tags:
only: /.*/
branches:
only: /.*/
- deploy:
requires:
- linting
- build
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
branches:
ignore: /.*/