Added simple version.sh check tool

This commit is contained in:
Mark Watkins 2014-07-30 02:47:19 +10:00
parent 19088770ef
commit 2e54a20dd1
3 changed files with 11 additions and 2 deletions

View File

@ -1 +1 @@
const int build_number = 6;
const int build_number = 7;

View File

@ -1 +1 @@
6
7

9
version.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
version=`cat ./sleepyhead/version.h | perl -ne 'my @array = /^const\s*int (major|minor|revision)_(version|number) = (\d+;).*/; print $array[2]' | perl -ne 'my @ar=split(";"); print join(".", @ar);'`
buildno=`cat ./sleepyhead/scripts/build_number`
gitversion=`git rev-parse --short HEAD`
echo "SleepyHead Source Information"
echo "Current Version: v${version}-${buildno} (git rev ${gitversion})"
echo "Last commit: `git log -1 --format=%cd`"
echo "Use 'git pull' to get up to date"