leverage makefile to run build tasks (#976)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
remove circle ci
authored by Joshua Harshman · committed by GitHub · parent 3c26245 · Browse files · 5 files·+73 added−66 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
5 files+73 added−66 removed
- other:+73 added−66 removed
Provenance
- Commit
39cf99f- Tree
5b1ef8f- Author
Joshua Harshman <josh.harshman@bit.ly>- Committer
GitHub <noreply@github.com>- Parent
3c26245
5 files changed+73 added−66 removed
deleted:.circleci/config.yml-53 removed
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253version: 2
references: workspace: &workspace /go/src/github.com/spf13/cobra
run_tests: &run_tests run: name: "All Commands" command: | mkdir -p bin curl -Lso bin/shellcheck https://github.com/caarlos0/shellcheck-docker/releases/download/v0.4.6/shellcheck chmod +x bin/shellcheck go get -t -v ./... PATH=$PATH:$PWD/bin go test -v ./... go build if [ -z $NOVET ]; then diff -u <(echo -n) <(go vet . 2>&1 | grep -vE 'ExampleCommand|bash_completions.*Fprint'); fi
jobs: go-current: docker: - image: circleci/golang:1.12 working_directory: *workspace steps: - checkout - *run_tests - run: name: "Check formatting" command: diff -u <(echo -n) <(gofmt -d -s .) go-previous: docker: - image: circleci/golang:1.11 working_directory: *workspace steps: - checkout - *run_tests go-latest: docker: - image: circleci/golang:latest working_directory: *workspace steps: - checkout - *run_tests
workflows: version: 2 main: jobs: - go-current - go-previous - go-latestadded:cobra/Makefile+23 added
1+XC_OS="linux darwin"2+XC_ARCH="amd64"3+XC_PARALLEL="2"4+BIN="../bin"5+SRC=$(shell find . -name "*.go")6+7+ifeq (, $(shell which gox))8+$(warning "could not find gox in $(PATH), run: go get github.com/mitchellh/gox")9+endif10+11+.PHONY: all build12+13+default: all14+15+all: build16+17+build:18+ gox \19+ -os=$(XC_OS) \20+ -arch=$(XC_ARCH) \21+ -parallel=$(XC_PARALLEL) \22+ -output=$(BIN)/{{.Dir}}_{{.OS}}_{{.Arch}} \23+ ;modified:.gitignore+1 added-1 removed
30 unmodified lines31 # auto-generated tag files32 tags33 34 *.exe35-cobra35 cobra.test36+bin37 38 .idea/39 *.imlmodified:.travis.yml+13 added-12 removed
12345678899101112131415161718192021181922232425262721222324282925262728language: go
stages: - diff - test - build
go: - 1.10.x - 1.11.x - 1.12.x - 1.13.x - tip
before_install: - go get -u github.com/kyoh86/richgo - go get -u github.com/mitchellh/gox
matrix: allow_failures: - go: tip include: - stage: diff go: 1.12.x script: diff -u <(echo -n) <(gofmt -d -s .) go: 1.13.x script: make fmt - stage: build go: 1.13.x script: make cobra_generator
before_install: go get -u github.com/kyoh86/richgo
script: - richgo test -v ./...script: - make test - go build - if [ -z $NOVET ]; then diff -u <(echo -n) <(go vet . 2>&1 | grep -vE 'ExampleCommand|bash_completions.*Fprint'); fiadded:Makefile+36 added
1+BIN="./bin"2+SRC=$(shell find . -name "*.go")3+4+ifeq (, $(shell which richgo))5+$(warning "could not find richgo in $(PATH), run: go get github.com/kyoh86/richgo")6+endif7+8+.PHONY: fmt vet test cobra_generator install_deps clean9+10+default: all11+12+all: fmt vet test cobra_generator 13+14+fmt:15+ $(info ******************** checking formatting ********************)16+ @test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1)17+18+test: install_deps vet19+ $(info ******************** running tests ********************)20+ richgo test -v ./...21+22+cobra_generator: install_deps23+ $(info ******************** building generator ********************)24+ mkdir -p $(BIN)25+ make -C cobra all26+27+install_deps:28+ $(info ******************** downloading dependencies ********************)29+ go get -v ./...30+31+vet:32+ $(info ******************** vetting ********************)33+ go vet ./...34+35+clean:36+ rm -rf $(BIN)