Skip to content
Merged
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
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ test:
lint:
@gometalinter --config gometalinter.json ./...


.PHONY: binary
binary:
@./scripts/build/binary
Expand All @@ -33,6 +32,10 @@ cross:
dynbinary:
@./scripts/build/dynbinary

.PHONY: watch
watch:
@./scripts/test/watch

# download dependencies (vendor/) listed in vendor.conf
.PHONY: vendor
vendor: vendor.conf
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Run all linting:
```
$ make -f docker.Makefile lint
```
`

### In-container development environment

Expand Down
4 changes: 4 additions & 0 deletions docker.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ test: build_docker_image
cross: build_cross_image
@docker run --rm $(MOUNTS) $(CROSS_IMAGE_NAME) make cross

.PHONY: watch
watch: build_docker_image
@docker run --rm $(MOUNTS) $(DEV_DOCKER_IMAGE_NAME) make watch

# start container in interactive mode for in-container development
.PHONY: dev
dev: build_docker_image
Expand Down
4 changes: 4 additions & 0 deletions dockerfiles/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ RUN go get github.com/jteeuwen/go-bindata/go-bindata && \
cp /go/bin/go-bindata /usr/bin && \
rm -rf /go/src/* /go/pkg/* /go/bin/*

RUN go get github.com/dnephin/filewatcher && \
cp /go/bin/filewatcher /usr/bin/ && \
rm -rf /go/src/* /go/pkg/* /go/bin/*

ENV CGO_ENABLED=0
WORKDIR /go/src/github.com/docker/cli
CMD sh
12 changes: 12 additions & 0 deletions scripts/test/watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

set -e

filewatcher \
-L 5 \
-x '**/*.swp' \
-x .git \
-x build \
-x .idea \
-- \
sh -c 'go test -timeout 10s -v ./${dir} || ( echo; echo; exit 1 )'