1
0
forked from sneak/mfer
mfer/bin/gitrev.sh
Jeffrey Paul 7df558d8d0 next (#5)
Co-authored-by: sneak <sneak@sneak.berlin>
Reviewed-on: sneak/mfer#5
2022-12-09 00:02:33 +00:00

13 lines
200 B
Bash

#!/bin/bash
#
if [[ ! -z "$DRONE_COMMIT_SHA" ]]; then
echo "${DRONE_COMMIT_SHA:0:7}"
exit 0
fi
if [[ ! -z "$GITREV" ]]; then
echo $GITREV
else
git describe --always --dirty=-dirty
fi