forked from kcl-lang/kcl-lang.io
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
57 lines (42 loc) · 1.08 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
# Copyright 2023 The KCL Authors. All rights reserved.
PROJECT_NAME = kcl-lang
PWD:=$(shell pwd)
BUILD_IMAGE:=kusionstack/kclvm-builder
# export DOCKER_DEFAULT_PLATFORM=linux/amd64
# or
# --platform linux/amd64
RUN_IN_DOCKER:=docker run -it --rm
RUN_IN_DOCKER+=-v ~/.ssh:/root/.ssh
RUN_IN_DOCKER+=-v ~/.gitconfig:/root/.gitconfig
RUN_IN_DOCKER+=-v ${PWD}:/root/kcl
RUN_IN_DOCKER+=-w /root/kcl ${BUILD_IMAGE}
.PHONY: run
run:
npm run start
.PHONY: install
install:
npm install
.PHONY: run-i18n
run-i18n:
npm run build && npx http-server ./build
.PHONY: check-link
check-link:
go run ./hack/linkcheck.go
.PHONY: version
version:
npm run docusaurus docs:version $(shell cat VERSION)
.PHONY: test
test:
./examples/test.sh
.PHONY: translations
translations:
npm run docusaurus write-translations
.PHONY: algolia
# Edit your API_KEY in .env before run `make algolia` for the `kcl-lang` index.
algolia:
docker run -it --env-file=.env -e "CONFIG=$(cat ./config.json | jq -r tostring)" algolia/docsearch-scraper
# ----------------
# Docker
# ----------------
sh-in-docker:
${RUN_IN_DOCKER} bash