-
Notifications
You must be signed in to change notification settings - Fork 24
/
Makefile
27 lines (20 loc) · 671 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.PHONY: image test citest release
IMAGE_NAME ?= codeclimate/codeclimate-duplication
RELEASE_REGISTRY ?= codeclimate
ifndef RELEASE_TAG
override RELEASE_TAG = latest
endif
image:
docker build --rm -t $(IMAGE_NAME) .
test: image
docker run --tty --interactive --rm $(IMAGE_NAME) bundle exec rspec $(RSPEC_ARGS)
citest:
docker run --rm $(IMAGE_NAME) bundle exec rake
bundle:
docker run --rm \
--entrypoint /bin/sh \
--volume $(PWD):/usr/src/app \
$(IMAGE_NAME) -c "bundle $(BUNDLE_ARGS)"
release:
docker tag $(IMAGE_NAME) $(RELEASE_REGISTRY)/codeclimate-duplication:$(RELEASE_TAG)
docker push $(RELEASE_REGISTRY)/codeclimate-duplication:$(RELEASE_TAG)