mirror of
https://github.com/octoleo/restic.git
synced 2024-11-05 12:57:53 +00:00
14 lines
284 B
Bash
14 lines
284 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
VERSION=$(git log --max-count=1 --pretty='%ad-%h' --date=short HEAD 2>/dev/null)
|
||
|
|
||
|
if [ -n "$VERSION" ]; then
|
||
|
if ! sh -c "git diff -s --exit-code && git diff --cached -s --exit-code"; then
|
||
|
VERSION+="+"
|
||
|
fi
|
||
|
else
|
||
|
VERSION="unknown version"
|
||
|
fi
|
||
|
|
||
|
echo $VERSION
|