2024-05-24 18:01:58 +08:00
|
|
|
#!/usr/bin/env bash
|
2022-11-18 01:56:24 +08:00
|
|
|
# This adds the version each backend was released to its docs page
|
|
|
|
set -e
|
|
|
|
for backend in $( find backend -maxdepth 1 -type d ); do
|
|
|
|
backend=$(basename $backend)
|
|
|
|
if [[ "$backend" == "backend" || "$backend" == "vfs" || "$backend" == "all" || "$backend" == "azurefile" ]]; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
2024-11-17 02:03:02 +08:00
|
|
|
commit=$(git log --oneline -- $backend | tail -n 1 | cut -d' ' -f1)
|
2022-11-18 01:56:24 +08:00
|
|
|
if [ "$commit" == "" ]; then
|
2024-11-17 02:03:02 +08:00
|
|
|
commit=$(git log --oneline -- backend/$backend | tail -n 1 | cut -d' ' -f1)
|
2022-11-18 01:56:24 +08:00
|
|
|
fi
|
2024-11-17 02:03:02 +08:00
|
|
|
version=$(git tag --contains $commit | grep ^v | sort -n | head -n 1)
|
2022-11-18 01:56:24 +08:00
|
|
|
echo $backend $version
|
|
|
|
sed -i~ "4i versionIntroduced: \"$version\"" docs/content/${backend}.md
|
|
|
|
done
|