File: autoversion.sh

package info (click to toggle)
sunxi-tools 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 520 kB
  • ctags: 959
  • sloc: ansic: 6,136; makefile: 133; asm: 120; sh: 67
file content (18 lines) | stat: -rwxr-xr-x 514 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#
# This script auto-updates a VERSION string definition.
# It outputs informational messages to stderr, while the actual
# output (on stdout) can easily be redirected to a file.
#

LATEST_RELEASE="v1.4.1"

if VER=`git describe --tags --dirty --always`; then
	echo "Setting version information: ${VER}" >&2
else
	VER=${LATEST_RELEASE}
	echo "Unable to determine current version (using \"${VER}\" as fallback)" >&2
fi
echo >&2

echo "/* Auto-generated information. DO NOT EDIT */"
echo "#define VERSION \"${VER}\""