File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -33,16 +33,18 @@ if [ $TIME_AGO -gt $LAST_FETCH_TIME ]; then
3333 cd ${HOOKS_PATH}
3434 git fetch --tags
3535
36- # Need gets tags from my styleguide-hooks repo, not local
3736 LAST_TAG=$( git tag -l | tail -n 1)
38- CURRENT_TAG=$( git tag -l --points-at HEAD)
37+ CURRENT=$( git tag -l --points-at HEAD)
38+ if [ -z " ${CURRENT} " ]; then
39+ CURRENT=$( git branch | grep ' \*' | sed ' s/\* //' )
40+ fi
3941
40- if [ " $LAST_TAG " == " $CURRENT_TAG " ]; then
42+ if [ " $LAST_TAG " == " $CURRENT " ]; then
4143 echo " styleguide-hooks up-to-date"
4244
43- elif ask " Update from ${CURRENT_TAG } to ${LAST_TAG} ?" Y; then
45+ elif ask " Checkout from ${CURRENT } to ${LAST_TAG} ?" Y; then
4446 git checkout " ${LAST_TAG} " 2> /dev/null && \
45- echo " styleguide-hooks updated from ${CURRENT_TAG } to ${LAST_TAG} "
47+ echo " styleguide-hooks updated from ${CURRENT } to ${LAST_TAG} "
4648 fi
4749 cd - > /dev/null
4850fi
You can’t perform that action at this time.
0 commit comments