-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
53 lines (43 loc) · 1.8 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
current_version_number := $(shell git tag --list "v*" | sort -V | tail -n 1 | cut -c 2-)
next_version_number := $(shell echo $$(($(current_version_number)+1)))
lint:
npm run lint:fix
refresh_concept_fixtures:
curl https://backend.codecrafters.io/api/v1/concepts/network-protocols\?include\=questions > mirage/concept-fixtures/network-protocols.js
curl https://backend.codecrafters.io/api/v1/concepts/tcp-overview\?include\=questions > mirage/concept-fixtures/tcp-overview.js
curl https://backend.codecrafters.io/api/v1/concepts/dummy\?include\=questions > mirage/concept-fixtures/dummy.js
gsed -i '1s/^/export default /' mirage/concept-fixtures/*.js
refresh_course_fixtures:
gh api repos/codecrafters-io/build-your-own-redis/contents/course-definition.yml \
| jq -r .content \
| base64 -d \
| yq -o json eval \
> mirage/course-fixtures/redis.js
gh api repos/codecrafters-io/build-your-own-docker/contents/course-definition.yml \
| jq -r .content \
| base64 -d \
| yq -o json eval \
> mirage/course-fixtures/docker.js
gh api repos/codecrafters-io/build-your-own-git/contents/course-definition.yml \
| jq -r .content \
| base64 -d \
| yq -o json eval \
> mirage/course-fixtures/git.js
gh api repos/codecrafters-io/build-your-own-sqlite/contents/course-definition.yml \
| jq -r .content \
| base64 -d \
| yq -o json eval \
> mirage/course-fixtures/sqlite.js
gh api repos/codecrafters-io/build-your-own-grep/contents/course-definition.yml \
| jq -r .content \
| base64 -d \
| yq -o json eval \
> mirage/course-fixtures/grep.js
gh api repos/codecrafters-io/build-your-own-dummy/contents/course-definition.yml \
| jq -r .content \
| base64 -d \
| yq -o json eval \
> mirage/course-fixtures/dummy.js
gsed -i '1s/^/export default /' mirage/course-fixtures/*.js
serve:
npm run start