2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

Added some code to create a buildinfo file included in the tar.bz2

file that contains information about the current xCAT build
This commit is contained in:
Victor Hu 2016-07-18 13:08:18 -04:00
parent 7efd57094c
commit 35cfdd56ba

View File

@ -175,6 +175,9 @@ function setversionvars {
VER=`cat Version`
SHORTVER=`cat Version|cut -d. -f 1,2`
SHORTSHORTVER=`cat Version|cut -d. -f 1`
BUILD_TIME=`date`
BUILD_MACHINE=`hostname`
COMMIT_ID=`git rev-parse --short HEAD`
}
@ -504,6 +507,16 @@ if [ -n "$VERBOSEMODE" ]; then
else
verboseflag=""
fi
#
# Add a VERSION file into the tar.bz2 file to track information about the build
#
BUILDINFO=$XCATCORE/buildinfo
echo "VERSION=$VER" > $BUILDINFO
echo "BUILD_TIME=$BUILD_TIME" >> $BUILDINFO
echo "BUILD_MACHINE=$BUILD_MACHINE" >> $BUILDINFO
echo "COMMIT_ID=$COMMIT_ID" >> $BUILDINFO
echo "Creating $(dirname $DESTDIR)/$TARNAME ..."
if [[ -e $TARNAME ]]; then
mkdir -p previous