Skip to content

Commit

Permalink
Merge branch 'main' into licensed-in-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Kottler committed May 18, 2021
2 parents fc923f5 + 703f307 commit 05a883d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:
- name: "Docker Test %n"
- name: "Go build and test %n"
command: make
plugins:
- docker-compose#v3.0.3:
- docker-compose#v3.7.0:
run: app
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
all: build test
.PHONY: all
all: build test lint

.PHONY: build test
.PHONY: test
test:
go test ./...

.PHONY: build
build:
go build ./...


.PHONY: licensed
licensed:
licensed cache
licensed status

.PHONY: lint
lint:
@script/lint
5 changes: 1 addition & 4 deletions internal/cmdutil/cmdutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,7 @@ func IsUnderHomebrew(binpath string) bool {
// HasHomebrew check whether the user has installed brew
func HasHomebrew() bool {
_, err := exec.LookPath("brew")
if err == nil {
return true
}
return false
return err == nil
}

// MySQLClientPath checks whether the 'mysql' client exists and returns the
Expand Down
9 changes: 9 additions & 0 deletions script/lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

set -e

# binary will be $(go env GOPATH)/bin/golangci-lint
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.40.1

golangci-lint --version
golangci-lint run ./...
7 changes: 0 additions & 7 deletions script/test

This file was deleted.

0 comments on commit 05a883d

Please sign in to comment.