--- /dev/null
+# Copyright (C) 2018 Jason Self <j@jxself.org>
+# Copying and distribution of this file, with or without
+# modification, are permitted in any medium without royalty provided
+# the copyright notice and this notice are preserved. This file is
+# offered as-is, without any warranty.
+
+branch=$(git rev-parse --abbrev-ref HEAD)
+if [ "$branch" != "master" ]
+then
+ git describe --tags
+else
+ commit_count=$(git rev-list HEAD --count)
+ short_hash=$(git rev-parse --short HEAD)
+ echo "$branch-$commit_count-$short_hash"
+fi
\ No newline at end of file