-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
45 lines (34 loc) · 1.05 KB
/
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
36
37
38
39
40
41
42
43
44
45
# 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.
CONFIG = config/application.yml
PORT ?= 8442
all: check
setup $(CONFIG): config/application.yml.default
bin/setup
fast_setup:
bin/fast_setup
docker_setup:
bin/docker_setup
check: lint test
lint:
@echo "--- rubocop ---"
bundle exec rubocop
@echo "--- brakeman ---"
bundle exec brakeman
@echo "--- bundler-audit ---"
bundle exec bundler-audit check --update
@echo "--- lint Gemfile.lock ---"
make lint_gemfile_lock
lint_gemfile_lock: Gemfile Gemfile.lock ## Lints the Gemfile and its lockfile
@bundle check
@git diff-index --quiet HEAD Gemfile.lock || (echo "Error: There are uncommitted changes after running 'bundle install'"; exit 1)
lintfix:
@echo "--- rubocop fix ---"
bundle exec rubocop -R -a
test: $(CONFIG)
bundle exec rspec
run:
foreman start -p $(PORT)