xmidt-org/themis

View on GitHub
rpkg.macros

Summary

Maintainability
Test Coverage
function git_short_hash {
    short_hash="$(cached git_short_hash)"

    if [ -z "$short_hash" ]; then
        short_hash="$(git rev-parse --short HEAD)"
    fi

    output "$short_hash"
}

function git_tag_version {
    tag="$(cached git_tag_version)"

    if [ -z "$tag" ]; then
        tag="$(git describe --tags --abbrev=0)"
    fi

    output "$tag"
}