forked from wavelet-lab/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
30 lines (27 loc) · 795 Bytes
/
Taskfile.yaml
File metadata and controls
30 lines (27 loc) · 795 Bytes
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
version: '3'
vars:
SPHINXOPTS: ''
SPHINXBUILD: 'sphinx-build'
SOURCEDIR: 'source'
BUILDDIR: 'build'
MARKER_FILE: '.build_running_marker'
tasks:
help:
desc: Display Sphinx help
cmds:
- |
'{{.SPHINXBUILD}} -M help "{{.SOURCEDIR}}" "{{.BUILDDIR}}" {{.SPHINXOPTS}}
'*':
desc: Build the documentation in the specified format (e.g., html, latex)
method: timestamp
sources:
- '{{.SOURCEDIR}}/**/*'
cmds:
- sleep 0.$((RANDOM % 100))s
- if [ -f {{.MARKER_FILE}} ]; then echo "Build already in progress. Skipping..."; exit 1; fi;
- |
touch {{.MARKER_FILE}}
- |
{{.SPHINXBUILD}} -M {{index .MATCH 0}} "{{.SOURCEDIR}}" "{{.BUILDDIR}}" {{.SPHINXOPTS}}
- defer: |
rm {{.MARKER_FILE}} || true