chore: add circle ci and use external assets
This commit is contained in:
1 parent
613a3f2811
commit
040455b4ac
12 files changed
+410
-2539
No files matched your search
+67
-7
@@ -1,19 +1,79 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
linting:
|
||||
docker:
|
||||
- image: circleci/golang:1.9
|
||||
|
||||
working_directory: /go/src/github.com/filebrowser/filebrowser
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Install Dependencies
|
||||
run: |
|
||||
command: |
|
||||
cd cmd/filebrowser && go get ./... && cd ../..
|
||||
go get github.com/alecthomas/gometalinter
|
||||
/go/bin/gometalinter --install
|
||||
|
||||
gometalinter --install
|
||||
- run:
|
||||
name: Run linting
|
||||
command: gometalinter --disable-all -E gofmt -E misspell -E ineffassign -E goimports -E deadcode --exclude="rice-box.go" --tests ./...
|
||||
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: /.*/
|
||||
Reference in new issue
Block a user