-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (27 loc) · 929 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
.PHONY: setup_mac install_homebrew install_gitleaks check_leaks install_nvm nvm_use_local nvm_lts preflight
setup_mac: install_homebrew install_gitleaks install_nvm nvm_use_local
install_homebrew:
@which brew || /bin/bash -c "$$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
install_gitleaks: install_homebrew
@which gitleaks || brew install gitleaks
check_leaks: install_gitleaks
gitleaks detect --source . -v
install_nvm:
@which nvm || brew install nvm
nvm_use_local: install_homebrew install_nvm
@source $(HOME)/.nvm/nvm.sh && \
nvm install && \
nvm use && \
nvm alias default node
nvm_lts: install_homebrew install_nvm
@source $(HOME)/.nvm/nvm.sh && \
nvm install --lts && \
nvm use --lts && \
nvm alias default node
preflight:
npm run lint && \
npm run pretty:check && \
npm run test && \
npm run build && \
$(MAKE) check_leaks && \
echo "Preflight checks passed"