mirror of
https://github.com/rclone/rclone.git
synced 2024-12-22 23:22:08 +01:00
acd5a893e2
* head -number is not allowed by POSIX.1-2024: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/head.html https://devmanual.gentoo.org/tools-reference/head-and-tail/index.html
18 lines
709 B
Bash
Executable File
18 lines
709 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# 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
|
|
|
|
commit=$(git log --oneline -- $backend | tail -n 1 | cut -d' ' -f1)
|
|
if [ "$commit" == "" ]; then
|
|
commit=$(git log --oneline -- backend/$backend | tail -n 1 | cut -d' ' -f1)
|
|
fi
|
|
version=$(git tag --contains $commit | grep ^v | sort -n | head -n 1)
|
|
echo $backend $version
|
|
sed -i~ "4i versionIntroduced: \"$version\"" docs/content/${backend}.md
|
|
done
|