From e64d8d8567c0f800241d0223f9c3a075cbb95abc Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 13 Apr 2017 08:55:28 -0400 Subject: [PATCH] Change to using the long commit ID instead of short commit ID to help automation testing scripts calculate more information. Sync'ed up the code between LINUX and UBUNTU builds so the variables are more similar --- build-ubunturepo | 16 ++++++++-------- buildcore.sh | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build-ubunturepo b/build-ubunturepo index 49e46cf63..70f4bda55 100755 --- a/build-ubunturepo +++ b/build-ubunturepo @@ -177,7 +177,7 @@ then short_short_ver=`cat Version|cut -d. -f 1` build_time=`date` build_machine=`hostname` - commit_id=`git rev-parse --short HEAD` + commit_id=`git rev-parse HEAD` package_dir_name=debs$REL #TODO: define the core path and tarball name @@ -362,14 +362,14 @@ __EOF__ chmod 775 mklocalrepo.sh # - # Add a buildinfo file under xcat-core to track information about the build + # Add a buildinfo file into the tar.bz2 file to track information about the build # - buildinfo=$local_core_repo_path/buildinfo - echo "VERSION=$ver" > $buildinfo - echo "RELEASE=$xcat_release" >> $buildinfo - echo "BUILD_TIME=$build_time" >> $buildinfo - echo "BUILD_MACHINE=$build_machine" >> $buildinfo - echo "COMMIT_ID=$commit_id" >> $buildinfo + BUILDINFO=$local_core_repo_path/buildinfo + echo "VERSION=$ver" > $BUILDINFO + echo "RELEASE=$xcat_release" >> $BUILDINFO + echo "BUILD_TIME=$build_time" >> $BUILDINFO + echo "BUILD_MACHINE=$build_machine" >> $BUILDINFO + echo "COMMIT_ID=$commit_id" >> $BUILDINFO #create the xcat-core.list file diff --git a/buildcore.sh b/buildcore.sh index 77b44068b..8686203c3 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -188,7 +188,7 @@ function setversionvars { SHORTSHORTVER=`echo $VER|cut -d. -f 1` BUILD_TIME=`date` BUILD_MACHINE=`hostname` - COMMIT_ID=`git rev-parse --short HEAD` + COMMIT_ID=`git rev-parse HEAD` XCAT_RELEASE="snap$(date '+%Y%m%d%H%M')" echo "$XCAT_RELEASE" >Release } @@ -541,7 +541,7 @@ else fi # -# Add a VERSION file into the tar.bz2 file to track information about the build +# Add a buildinfo file into the tar.bz2 file to track information about the build # BUILDINFO=$XCATCORE/buildinfo echo "VERSION=$VER" > $BUILDINFO