do not resolve to a tag

This commit is contained in:
Girish Ramakrishnan
2015-10-30 17:40:17 -07:00
parent fe0c1745e1
commit 6cf0554e23

View File

@@ -65,19 +65,8 @@ fi
function get_pretty_revision() {
local git_rev="$1"
local sha1=$(git rev-parse --short "${git_rev}" 2>/dev/null)
local name=$(git name-rev --name-only --tags "${sha1}" 2>/dev/null)
if [[ -z "${name}" ]]; then
echo "Unable to resolve $1"
exit 1
fi
# fallback to sha1 if we cannot find a tag
if [[ "${name}" == "undefined" ]]; then
echo "${sha1}"
else
echo "${name}"
fi
echo "${sha1}"
}
now=$(date "+%Y-%m-%d-%H%M%S")