mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-08 11:22:10 +00:00

Former-commit-id: 515a160e341e7dcd338c7aea0a73c8dea0a917ca [formerly 85d6e4c2e150055fd8a2ba223bf8a7ee92116f72] [formerly 703c59c0f952f0fb7e43159c98328e53d1a92c04 [formerly 46b5fa013c99bff7fec56aea641938feb243bb2b]] Former-commit-id: 1f6a9e78cdab0a6a6066248d98464bafd9d3f1c3 [formerly e102d783604d0afaff7e45a6dfd6eed9b7065e0d] Former-commit-id: 22ffc5fbb93cd96609b04baf437e63db7bbfbe1b
85 lines
2.3 KiB
YAML
85 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 \
|
|
-D gosec
|
|
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: /.*/
|