gsctool: fix version string generation and processing

Function reporting the version of the gsctool expects the VERSION
variable generated by ./util/getversion.sh utility to start with a
single underscore without a prefix. But the utility could be adding
various prefixes to the VERSION string depending on the environment
variable settings.

Those settings are irrelevant for gsctool, it should ignore the prefix
up to the first underscore character found in the VERSION string.

Also, modify the Makefile to make sure the build date reported by
getversion.sh is accurate.

BRANCH=none
BUG=chromium:932361
TEST=built gsctool and checked version reporting:

   make BOARD=cr50 CR50_DEV=1  gsctool
   ./gsctool -v
   Version: v2.0.821+e890d0974 tpm2:v0.0.320-e987095 \
     cryptoc:v0.0.10-b256f39, built on 2019-02-15 10:25:08 \
     by vbendeb@eskimo.mtv.corp.google.com

Change-Id: I5fb6c4aa1dea6e857fffc7ec5e5a599d61175044
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1474736
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
2 files changed