forked from lucassabreu/clockify-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-docs
More file actions
executable file
·29 lines (23 loc) · 732 Bytes
/
deploy-docs
File metadata and controls
executable file
·29 lines (23 loc) · 732 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
#!/bin/sh
download() {
curl -s https://api.github.com/repos/lucassabreu/clockify-cli/releases/latest | \
grep 'browser_download_url.*clockify-cli_.*_Linux_x86_64.tar.gz' | \
cut -d : -f 2- | tr -d \" | \
wget -qi - -O- | tar zxf - clockify-cli
}
set -e
download
rm -rf docs/content/commands/* || true
./clockify-cli gendocs docs/content/commands
# fix root command to be "chapter root"
mv docs/content/commands/clockify-cli.md docs/content/commands/_index.md
# add license information
mkdir -p docs/content/license
echo '---
title: License
chapter: true
---
```txt' > docs/content/license/_index.md
cat LICENSE >> docs/content/license/_index.md
echo '```' >> docs/content/license/_index.md
cd docs && hugo