forked from Hexlet/hexlet-cv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
104 lines (76 loc) · 1.72 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
include make-compose.mk
include make-services-app-docker.mk
include make-podman-compose.mk
include make-services-app-podman.mk
test:
RAILS_LOCALE=en bin/rails test
bin/rails test
frontend:
npx nodemon -L --watch webpack.config.js --exec npm run build:watch
backend:
rm -rf tmp/pids/server.pid
bundle exec rails s -p 3000 -b '0.0.0.0'
setup-heroku:
curl https://cli-assets.heroku.com/install.sh | sh
setup:
make setup-heroku || true
make setup-heroku-arm64 || true
make setup-app
setup-heroku-arm64:
arch -x86_64 /bin/zsh -c 'curl https://cli-assets.heroku.com/install.sh | sh'
# setup-arm64: setup-heroku-arm64 setup-app
setup-app:
cp -n .env.example .env || true
bin/setup
make db-reset
npm i
npm run build
npx simple-git-hooks
fixtures-load:
bin/rails db:fixtures:load
clean:
bin/rails db:drop
console:
bin/rails c
db-reset:
bin/rails db:drop
bin/rails db:create
bin/rails db:schema:load
bin/rails db:migrate
bin/rails db:fixtures:load
start:
heroku local -p 3000
lint: lint-code lint-style
lint-code:
bundle exec rubocop
bundle exec slim-lint app/views/
make lint-eslint
lint-eslint:
npx eslint app/javascript --ext .js
lint-eslint-fix:
npx eslint app/javascript --ext .js --fix
lint-style:
npx stylelint "**/*.scss" "!**/vendor/**"
linter-code-fix:
bundle exec rubocop -A
editor-setup:
bundle exec annotate --models
deploy:
git push heroku main
lsp-configure:
bundle exec yard gems
bundle exec solargraph bundle
heroku-console:
heroku run rails console
heroku-logs:
heroku logs --tail
ci-setup:
cp -n .env.example .env || true
npm ci
npm run build
bundle
# RAILS_ENV=test bin/rails db:prepare
# bin/rails db:fixtures:load
check: lint test
ci-setup-check: ci-setup check
.PHONY: test