Created
June 19, 2016 22:03
-
-
Save arashkashi/f9cbc545e8980c385e4e795b2aea12d7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
HEAD_HASH=$(git rev-parse HEAD) | |
TAGS=$(git tag) | |
RESULT_FILE_NAME="" | |
for tag in $TAGS | |
do | |
TAG_COMMIT_HASH=$(git rev-list -n 1 $tag) | |
if [ "$TAG_COMMIT_HASH" = "$HEAD_HASH" ]; then | |
RESULT_FILE_NAME=arash${tag}.framework | |
fi | |
done | |
if [ "$RESULT_FILE_NAME" = "" ]; then | |
RESULT_FILE_NAME=arash===${HEAD_HASH}.framework | |
fi | |
echo $RESULT_FILE_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment