Skip to content

Commit

Permalink
Merge pull request cockroachdb#15 from cuongdo/dockergitclean
Browse files Browse the repository at this point in the history
Add `dockergitclean` target to Makefile
  • Loading branch information
cuongdo committed Feb 28, 2017
2 parents ee21ae5 + 7225fae commit 15f1253
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Makefile
Expand Up @@ -17,6 +17,8 @@

GO ?= go
POSTGRES_TEST_TAG ?= 20170227-1358
EXAMPLES_ORMS_PATH = /examples-orms
DOCKER = docker run --volume="$(shell pwd)":/examples-orms cockroachdb/postgres-test:$(POSTGRES_TEST_TAG)

.PHONY: all
all: test
Expand All @@ -32,9 +34,14 @@ test:

.PHONY: dockertest
dockertest:
docker run --volume="$(shell pwd)":/examples-orms \
"cockroachdb/postgres-test:$(POSTGRES_TEST_TAG)" \
make -C /examples-orms deps test
$(DOCKER) make -C $(EXAMPLES_ORMS_PATH) deps test

# Run `git clean` in Docker to remove leftover files that are owned by root.
# This must be run after `dockertest` to ensure that successive CI runs don't
# fail.
.PHONY: dockergitclean
dockergitclean:
$(DOCKER) /bin/bash -c "cd $(EXAMPLES_ORMS_PATH) && git clean -f -d -x ."

.PHONY: deps
deps:
Expand Down

0 comments on commit 15f1253

Please sign in to comment.