-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
35 lines (26 loc) · 914 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
28
29
30
31
32
33
34
35
# Makefile for building and running the project.
# The purpose of this Makefile is to avoid developers having to remember
# project-specific commands for building, running, etc. Recipes longer
# than one or two lines should live in script files of their own in the
# bin/ directory.
PORT ?= 3001
all: check
setup:
bin/setup
check: lint test
lint:
@echo "--- rubocop ---"
ifdef JUNIT_OUTPUT
bundle exec rubocop --parallel --format progress --format junit --out rubocop.xml --display-only-failed
else
bundle exec rubocop --parallel
endif
@echo "--- eslint ---"
yarn lint
lint_database_schema_files: ## Checks that database schema files have not changed
(! git diff --name-only | grep db/schema.rb) || (echo "Error: db/schema.rb does not match after running migrations"; exit 1)
test:
bundle exec rspec
run:
foreman start -p $(PORT)
.PHONY: setup all lint lint_database_schema_files run test check