mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-05 06:10:13 -05:00
Add version support also at the source distribution
This commit is contained in:
parent
ef84db7477
commit
06e0954d5e
3 changed files with 20 additions and 2 deletions
14
autover.sh
Executable file
14
autover.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
|
||||
if [ -d .git ]; then
|
||||
# Get version from git tags, removing the 'v' prefix
|
||||
VERSION=`git describe --match 'v*' | sed 's/^v//'`
|
||||
elif [ -f .version ]; then
|
||||
# Get version from the .version file
|
||||
VERSION=`cat .version`
|
||||
else
|
||||
VERSION="none"
|
||||
fi
|
||||
|
||||
printf '%s' "$VERSION"
|
||||
Loading…
Add table
Add a link
Reference in a new issue