Skip to content

Commit

Permalink
Merge pull request #363 from jphuynh/shellcheckReadme
Browse files Browse the repository at this point in the history
Update README and add help target to make
  • Loading branch information
thaJeztah authored Jul 22, 2017
2 parents b175e3a + 649a586 commit deab50b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
37 changes: 18 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,61 @@
#
all: binary

# remove build artifacts

.PHONY: clean
clean:
clean: ## remove build artifacts
rm -rf ./build/* cli/winresources/rsrc_* ./man/man[1-9] docs/yaml/gen

# run go test
# the "-tags daemon" part is temporary
.PHONY: test
test:
test: ## run go test
./scripts/test/unit $(shell go list ./... | grep -v '/vendor/')

.PHONY: test-coverage
test-coverage:
test-coverage: ## run test coverage
./scripts/test/unit-with-coverage $(shell go list ./... | grep -v '/vendor/')

.PHONY: lint
lint:
lint: ## run all the lint tools
gometalinter --config gometalinter.json ./...

.PHONY: binary
binary:
binary: ## build executable for Linux
@echo "WARNING: binary creates a Linux executable. Use cross for macOS or Windows."
./scripts/build/binary

.PHONY: cross
cross:
cross: ## build executable for macOS and Windows
./scripts/build/cross

.PHONY: dynbinary
dynbinary:
dynbinary: ## build dynamically linked binary
./scripts/build/dynbinary

.PHONY: watch
watch:
watch: ## monitor file changes and run go test
./scripts/test/watch

# Check vendor matches vendor.conf
vendor: vendor.conf
vendor: vendor.conf ## check that vendor matches vendor.conf
vndr 2> /dev/null
scripts/validate/check-git-diff vendor

## generate man pages from go source and markdown
.PHONY: manpages
manpages:
manpages: ## generate man pages from go source and markdown
scripts/docs/generate-man.sh

## generate documentation YAML files consumed by docs repo
.PHONY: yamldocs
yamldocs:
yamldocs: ## generate documentation YAML files consumed by docs repo
scripts/docs/generate-yaml.sh

## Shellcheck validation
.PHONY: shellcheck
shellcheck:
shellcheck: ## run shellcheck validation
scripts/validate/shellcheck

.PHONY: help
help: ## print this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)


cli/compose/schema/bindata.go: cli/compose/schema/data/*.json
go generate github.com/docker/cli/cli/compose/schema

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ Run all linting:
$ make -f docker.Makefile lint
```

List all the available targets:

```
$ make help
```

### In-container development environment

Start an interactive development environment:
Expand Down

0 comments on commit deab50b

Please sign in to comment.