Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ clean: ## remove build artifacts

.PHONY: test-unit
test-unit: ## run unit tests, to change the output format use: GOTESTSUM_FORMAT=(dots|short|standard-quiet|short-verbose|standard-verbose) make test-unit
gotestsum $(TESTFLAGS) -- $${TESTDIRS:-$(shell go list ./... | grep -vE '/vendor/|/e2e/')}
gotestsum $(TESTFLAGS) -- -tags osusergo $${TESTDIRS:-$(shell go list ./... | grep -vE '/vendor/|/e2e/')}

.PHONY: test
test: test-unit ## run tests

.PHONY: test-coverage
test-coverage: ## run test coverage
gotestsum -- -coverprofile=coverage.txt $(shell go list ./... | grep -vE '/vendor/|/e2e/')
gotestsum -- -tags osusergo -coverprofile=coverage.txt $(shell go list ./... | grep -vE '/vendor/|/e2e/')

.PHONY: fmt
fmt:
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/binary
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ source ./scripts/build/.variables

echo "Building statically linked $TARGET"
export CGO_ENABLED=0
go build -o "${TARGET}" --ldflags "${LDFLAGS}" "${SOURCE}"
go build -tags osusergo -o "${TARGET}" --ldflags "${LDFLAGS}" "${SOURCE}"

ln -sf "$(basename "${TARGET}")" build/docker
2 changes: 1 addition & 1 deletion scripts/build/plugins
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ for p in cli-plugins/examples/* "$@" ; do

echo "Building statically linked $TARGET"
export CGO_ENABLED=0
go build -o "${TARGET}" --ldflags "${LDFLAGS}" "github.com/docker/cli/${p}"
go build -tags osusergo -o "${TARGET}" --ldflags "${LDFLAGS}" "github.com/docker/cli/${p}"
done
2 changes: 1 addition & 1 deletion scripts/docs/generate-man.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mkdir -p ./man/man1
go install ./vendor/github.com/cpuguy83/go-md2man

# Generate man pages from cobra commands
go build -o /tmp/gen-manpages github.com/docker/cli/man
go build -tags osusergo -o /tmp/gen-manpages github.com/docker/cli/man
/tmp/gen-manpages --root "$(pwd)" --target "$(pwd)/man/man1"

# Generate legacy pages from markdown
Expand Down
2 changes: 1 addition & 1 deletion scripts/docs/generate-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -eu -o pipefail

mkdir -p docs/yaml/gen

go build -o build/yaml-docs-generator github.com/docker/cli/docs/yaml
go build -tags osusergo -o build/yaml-docs-generator github.com/docker/cli/docs/yaml
build/yaml-docs-generator --root "$(pwd)" --target "$(pwd)/docs/yaml/gen"