firecrawl/apps/redis/scripts/version.sh

6 lines
244 B
Bash
Raw Normal View History

2024-08-23 05:37:52 +08:00
ORIGIN=${ORIGIN:-origin}
version=$(git fetch --tags "${ORIGIN}" &>/dev/null | git -c "versionsort.prereleasesuffix=-pre" tag -l --sort=version:refname | grep -v dev | grep -vE '^v2$' | grep -vE '^v1$' | tail -n1 | cut -c 2-)
echo "$version"