-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMakefile
77 lines (61 loc) · 1.97 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
DOWNLOADER_HOME=/home/tirion
SSH_KEYS_PATH?=$(HOME)/.ssh
UID := $(shell id -u)
GID := $(shell id -g)
HEXLETHQ=hexlethq
LOCALE ?=
REGISTRY := cr.yandex/crpa5i79t7oiqnj0ap8g
setup: create-config build-downloader pull prepare-dirs
make -C import-documentation all
npm ci
prepare-dirs:
mkdir -p exercises
mkdir -p courses
mkdir -p projects
mkdir -p programs
mkdir -p boilerplates
ln -s $(CURDIR) $(CURDIR)/hexlethq
pull:
docker pull $(REGISTRY)/hexlet-python
docker pull $(REGISTRY)/hexlet-java
docker pull $(REGISTRY)/hexlet-javascript
docker pull $(REGISTRY)/hexlet-php
docker pull $(REGISTRY)/hexlet-go
docker pull ghcr.io/hexlet/languagetool-cli
create-config:
touch gitlab.token
build-downloader:
./scripts/download-downloader
copy-from-cb:
make -C code-basics-synchronizer
downloader-run:
./ghorg clone --config ghorg.conf.yaml --path $(CURDIR) $(HEXLETHQ)/$(FILTER)$(if $(LOCALE),/$(LOCALE))
clone: clone-courses clone-exercises clone-projects clone-boilerplates
clone-courses:
make downloader-run FILTER=courses
clone-exercises:
make downloader-run FILTER=exercises
clone-projects:
make downloader-run FILTER=projects
clone-boilerplates:
make downloader-run FILTER=boilerplates
update-hexlet-linter:
docker pull $(REGISTRY)/common-${L}
docker volume rm -f hexlet-linter-${L}
docker run --rm -v hexlet-linter-${L}:/linter $(REGISTRY)/common-${L} echo > /dev/null
update-hexlet-linters:
make update-hexlet-linter L=eslint
make update-hexlet-linter L=python-flake8
make update-hexlet-linter L=phpcs
make update-hexlet-linter L=checkstyle
make update-hexlet-linter L=sqlint
make update-hexlet-linter L=rubocop
make update-hexlet-linter L=multi-language
make update-hexlet-linter=golangci-lint
create-localizer-config:
cp -n content-localizer/.env.template content-localizer/.env || echo 'already exists'
build-localizer: create-localizer-config
docker build -t hexlet/content-localizer \
--build-arg UID=$(UID) \
--build-arg GID=$(GID) \
./content-localizer