Skip to content

Commit

Permalink
chore: circle CI (#14)
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Henrique Dias <[email protected]>
  • Loading branch information
hacdias committed May 12, 2019
1 parent 61462c1 commit 505a10a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 23 deletions.
42 changes: 42 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: 2
jobs:
lint:
docker:
- image: golangci/golangci-lint:v1.16
steps:
- checkout
- run: golangci-lint run -v
build:
docker:
- image: circleci/golang:1.12
steps:
- checkout
- run: cd cmd/webdav && go build main.go
release:
docker:
- image: circleci/golang:1.12
steps:
- checkout
- run: curl -sL https://git.io/goreleaser | bash
workflows:
version: 2
build-workflow:
jobs:
- lint:
filters:
tags:
only: /.*/
- build:
filters:
tags:
only: /.*/
- release:
context: deploy
requires:
- build
- lint
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
3 changes: 0 additions & 3 deletions .gitignore

This file was deleted.

19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/webdav/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func basicAuth(c *cfg) http.Handler {
w.Header().Set("WWW-Authenticate", `Basic realm="Restricted"`)

username, password, authOK := r.BasicAuth()
if authOK == false {
if !authOK {
http.Error(w, "Not authorized", 401)
return
}
Expand Down

0 comments on commit 505a10a

Please sign in to comment.