-
Notifications
You must be signed in to change notification settings - Fork 6
/
Taskfile.yaml
51 lines (45 loc) · 1.77 KB
/
Taskfile.yaml
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
version: '3'
tasks:
default: task -l
import-tools:
desc: import tool documentation
silent: true
cmds:
- test -d "openserverless-cli" && git pull || git clone https://github.com/apache/openserverless-cli
- |
find openserverless-cli/tools -name "*.md" | while read file
do
name=$(basename $file .md)
echo "Working on tool ${name} in file ${file}"
mkdir -p content/en/docs/reference/tools/$name
echo -e "---\ntitle: $name\n---\n" > content/en/docs/reference/tools/$name/_index.md
sed '/^# /d' "$file" >> content/en/docs/reference/tools/$name/_index.md
# cat $file >> content/en/docs/reference/tools/$name/_index.md
done
- cp tools.md content/en/docs/reference/tools/_index.md
#- rm -rf openserverless-cli
import-task:
desc: import task documentation
silent: true
cmds:
- test -d "openserverless-task" && git pull || git clone https://github.com/apache/openserverless-task
- |
find openserverless-task -name "docopts.md" | while read file
do
tgt=$(echo $file | sed -e 's!openserverless-task/!!' -e 's/docopts/_index/')
echo "> Converting ${file} to ${tgt}"
mkdir -p "content/en/docs/reference/tasks/$(dirname $tgt)"
name="$(basename $(dirname "Tasks"/$tgt))"
echo -e "---\ntitle: ${name}\n---\n" >content/en/docs/reference/tasks/$tgt
sed '/^# /d' "$file" >>content/en/docs/reference/tasks/$tgt
#cat $file >>content/en/docs/reference/tasks/$tgt
done
#- rm -rf openserverless-task
preview:
desc: preview the websites
cmds:
- hugo server
debug:
desc: debug the websites
cmds:
- hugo server --ignoreCache --debug --disableFastRender