2017-12-22 19:58:23 +00:00
|
|
|
IMAGE_NAME=codevalet/canary
|
2017-09-03 19:17:45 +00:00
|
|
|
|
|
|
|
all: check container
|
|
|
|
|
2017-09-04 00:27:18 +00:00
|
|
|
check: spec check-container
|
2017-09-03 19:17:45 +00:00
|
|
|
|
2017-09-04 00:27:18 +00:00
|
|
|
spec: depends
|
2017-09-04 16:05:53 +00:00
|
|
|
./scripts/ruby bundle exec rspec -c \
|
|
|
|
--order random \
|
|
|
|
--format progress \
|
|
|
|
--format html --out rspec.html
|
2017-09-03 19:17:45 +00:00
|
|
|
|
2017-09-04 18:01:32 +00:00
|
|
|
rubocop: depends
|
|
|
|
./scripts/ruby bundle exec rubocop
|
|
|
|
|
2017-09-03 19:17:45 +00:00
|
|
|
depends: Gemfile
|
|
|
|
./scripts/ruby bundle install
|
|
|
|
|
|
|
|
run: depends
|
2017-09-04 00:27:18 +00:00
|
|
|
./scripts/ruby bundle exec puma
|
|
|
|
|
2018-02-20 22:14:13 +00:00
|
|
|
update: Gemfile
|
|
|
|
./scripts/ruby bundle update
|
|
|
|
|
2017-09-04 00:27:18 +00:00
|
|
|
check-container: container
|
2017-12-22 19:58:23 +00:00
|
|
|
docker run --rm $(IMAGE_NAME):latest bundle exec puma --version
|
2017-09-03 19:17:45 +00:00
|
|
|
|
|
|
|
container: depends Dockerfile
|
2017-12-22 19:58:23 +00:00
|
|
|
docker build -t $(IMAGE_NAME) .
|
|
|
|
|
|
|
|
deploy: container
|
|
|
|
docker push $(IMAGE_NAME):latest
|
2017-09-03 19:17:45 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf vendor
|
|
|
|
|
2018-02-20 22:14:13 +00:00
|
|
|
.PHONY: all depends clean run check container update spec check-container rubocop
|