OSCAR-code/version.sh

10 lines
477 B
Bash
Raw Normal View History

2014-07-29 16:47:19 +00:00
#!/bin/bash
2019-02-13 18:20:46 +00:00
version=`cat ./oscr/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 ./oscr/scripts/build_number`
2014-07-29 16:47:19 +00:00
gitversion=`git rev-parse --short HEAD`
2019-02-13 18:20:46 +00:00
echo "OSCR Source Information"
2014-07-29 16:47:19 +00:00
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"