Skip to content

Commit

Permalink
Merge pull request #497 from VisionSystemsInc/git-commit
Browse files Browse the repository at this point in the history
Add helper function
  • Loading branch information
andyneff authored Jan 24, 2024
2 parents f25fbf2 + 4618dab commit d98189e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions linux/git_commit_description
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

#*# linux/git_commit_description

#**
# ======================
# Git Commit Description
# ======================
#
# .. default-domain:: bash
#
# .. file:: git_commit_description
#
# :Output: *stdout* - The preferred ``git describe`` output
#
# Helper script for printing out the preferred ``git describe`` for a repo
#**

function git_commit_description()
{
git describe --all --long --always --dirty
}

if [ "${BASH_SOURCE[0]}" = "${0}" ] || [ "$(basename "${BASH_SOURCE[0]}")" = "${0}" ]; then
git_commit_description ${@+"${@}"}
exit "${?}"
fi

0 comments on commit d98189e

Please sign in to comment.