mirror of
https://github.com/andreili/katapult.git
synced 2025-08-23 19:34:06 +02:00
13 lines
290 B
Bash
Executable File
13 lines
290 B
Bash
Executable File
#!/bin/sh
|
|
# Detect the version of Katapult
|
|
|
|
a="/$0"; a="${a%/*}"; a="${a:-.}"; a="${a##/}/"; SRCDIR=$(cd "$a/.."; pwd)
|
|
|
|
if [ -e "${SRCDIR}/.git" ]; then
|
|
git describe --tags --long --always --dirty
|
|
elif [ -f "${SRCDIR}/.version" ]; then
|
|
cat "${SRCDIR}/.version"
|
|
else
|
|
echo "?"
|
|
fi
|