github.com/saucelabs/saucectl@v0.175.1/Makefile (about)

     1  default:
     2  	@grep -E '[a-zA-Z]+:.*?@ .*$$' $(MAKEFILE_LIST)| tr -d '#' | awk 'BEGIN {FS = ":.*?@ "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
     3  
     4  #install: @ Install the CLI
     5  .PHONY: install
     6  install:
     7  	GOBIN=/usr/local/bin/ go install cmd/saucectl/saucectl.go
     8  
     9  #build: @ Build the CLI
    10  build:
    11  	go build cmd/saucectl/saucectl.go
    12  
    13  build-%:
    14  	GOOS=$* GOARCH=amd64 make build
    15  
    16  #lint: @ Run the linter
    17  lint:
    18  	golangci-lint run
    19  
    20  #format: @ Format code with gofmt
    21  format:
    22  	gofmt -w .
    23  
    24  #test: @ Run tests
    25  test:
    26  	go test ./...
    27  
    28  #coverage: @ Run test and check coverage
    29  coverage:
    30  	go test -coverprofile=coverage.out ./...
    31  	go tool cover -func=coverage.out
    32  	@rm coverage.out
    33  
    34  #schema: @ Build the json schema
    35  schema:
    36  	$(eval INPUT_SCHEMA := $(shell pwd)/api/global.schema.json)
    37  	$(eval OUTPUT_SCHEMA := $(shell pwd)/api/saucectl.schema.json)
    38  	pushd scripts/json-schema-bundler/ && \
    39  	npm run bundle -- -s $(INPUT_SCHEMA) -o $(OUTPUT_SCHEMA) && \
    40  	popd