Created
September 26, 2018 08:09
-
-
Save Auronmatrix/f330341918c69427372b2655f7ee8190 to your computer and use it in GitHub Desktop.
Git Tags for Directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for d in */ ; do | |
cd $d | |
if [ -d .git ]; | |
then | |
TAG=$(git describe --abbrev=0 --tags 2>/dev/null) | |
if [[ $TAG =~ ^v ]]; | |
then | |
echo "$d : $TAG" | |
fi | |
fi | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment