filebrowser/.circleci/config.yml
Henrique Dias a89701b746 chore: add circle ci and use external assets
Former-commit-id: a474183e1779f03ebbf0feacb6c657a7c3f32fb1 [formerly c2c77a210a1a121f6d3ba5331093a8a0b5ed9f1e] [formerly 8cc259f949bcab23ea5bb402c2f551428fa7f22b [formerly 040455b4ac]]
Former-commit-id: e05cf0627cde1ae2266c06851590573e5bdecc6e [formerly 458fc2c269daa31cc18a4132a4c801f748a610af]
Former-commit-id: 946b8ed702254d3c11f1b791c790af606f2a68f4
2018-02-01 16:18:44 +00:00

80 lines
1.9 KiB
YAML

version: 2
jobs:
linting:
docker:
- image: circleci/golang:1.9
working_directory: /go/src/github.com/filebrowser/filebrowser
steps:
- checkout
- run:
name: Install Dependencies
command: |
cd cmd/filebrowser && go get ./... && cd ../..
go get github.com/alecthomas/gometalinter
gometalinter --install
- run:
name: Run linting
command: |
gometalinter --exclude="rice-box.go" \
-D goconst \
-D gocyclo \
-D vetshadow \
-D errcheck \
-D golint \
-D gas
build:
docker:
- image: circleci/golang:1.9
working_directory: /go/src/github.com/filebrowser/filebrowser
steps:
- checkout
- run:
name: Install Dependencies
command: |
cd cmd/filebrowser
go get ./...
- run:
name: Building
command: go build
deploy:
docker:
- image: circleci/golang:1.9
working_directory: /go/src/github.com/filebrowser/filebrowser
steps:
- checkout
- run:
name: Install Dependencies
command: |
cd cmd/filebrowser
go get ./...
cd ../..
- 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: /.*/