2020-03-09 00:25:35 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
# Must be called from the root directory
|
2020-04-06 14:19:55 +02:00
|
|
|
if [[ -f api_index.md ]]; then rm api_index.md; fi
|
|
|
|
|
cat >>api_index.md <<EOF
|
2020-03-09 00:25:35 +01:00
|
|
|
---
|
|
|
|
|
title: "API"
|
|
|
|
|
---
|
|
|
|
|
EOF
|
2020-04-06 14:19:55 +02:00
|
|
|
tags=()
|
2020-03-09 00:25:35 +01:00
|
|
|
for tag in $(git tag --list); do
|
|
|
|
|
if [[ ${tag} != "list" && ${tag} != *"test"* ]]; then
|
2020-04-06 14:19:55 +02:00
|
|
|
tag=$(echo "${tag}" | sed -r 's/v//g')
|
|
|
|
|
tags+=("${tag}")
|
2020-03-09 00:25:35 +01:00
|
|
|
fi
|
|
|
|
|
done
|
2020-04-06 14:19:55 +02:00
|
|
|
IFS=$'\n' tags=($(sort <<<"${tags[*]}")); unset IFS
|
|
|
|
|
for tag in "${tags[@]}"; do
|
|
|
|
|
echo "- [${tag}](${tag})" >> api_index.md
|
|
|
|
|
done
|