-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
leverage makefile to run build tasks (#976)
remove circle ci
- Loading branch information
Showing
5 changed files
with
73 additions
and
66 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,8 +32,8 @@ Session.vim | |
tags | ||
|
||
*.exe | ||
cobra | ||
cobra.test | ||
bin | ||
|
||
.idea/ | ||
*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
BIN="./bin" | ||
SRC=$(shell find . -name "*.go") | ||
|
||
ifeq (, $(shell which richgo)) | ||
$(warning "could not find richgo in $(PATH), run: go get github.com/kyoh86/richgo") | ||
endif | ||
|
||
.PHONY: fmt vet test cobra_generator install_deps clean | ||
|
||
default: all | ||
|
||
all: fmt vet test cobra_generator | ||
|
||
fmt: | ||
$(info ******************** checking formatting ********************) | ||
@test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1) | ||
|
||
test: install_deps vet | ||
$(info ******************** running tests ********************) | ||
richgo test -v ./... | ||
|
||
cobra_generator: install_deps | ||
$(info ******************** building generator ********************) | ||
mkdir -p $(BIN) | ||
make -C cobra all | ||
|
||
install_deps: | ||
$(info ******************** downloading dependencies ********************) | ||
go get -v ./... | ||
|
||
vet: | ||
$(info ******************** vetting ********************) | ||
go vet ./... | ||
|
||
clean: | ||
rm -rf $(BIN) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
XC_OS="linux darwin" | ||
XC_ARCH="amd64" | ||
XC_PARALLEL="2" | ||
BIN="../bin" | ||
SRC=$(shell find . -name "*.go") | ||
|
||
ifeq (, $(shell which gox)) | ||
$(warning "could not find gox in $(PATH), run: go get github.com/mitchellh/gox") | ||
endif | ||
|
||
.PHONY: all build | ||
|
||
default: all | ||
|
||
all: build | ||
|
||
build: | ||
gox \ | ||
-os=$(XC_OS) \ | ||
-arch=$(XC_ARCH) \ | ||
-parallel=$(XC_PARALLEL) \ | ||
-output=$(BIN)/{{.Dir}}_{{.OS}}_{{.Arch}} \ | ||
; |