diff --git a/build-ubunturepo b/build-ubunturepo index 49e46cf63..6e01caab8 100755 --- a/build-ubunturepo +++ b/build-ubunturepo @@ -178,6 +178,7 @@ then build_time=`date` build_machine=`hostname` commit_id=`git rev-parse --short HEAD` + commit_id_long=`git rev-parse HEAD` package_dir_name=debs$REL #TODO: define the core path and tarball name @@ -362,14 +363,15 @@ __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 + echo "COMMIT_ID_LONG=$commit_id_long" >> $BUILDINFO #create the xcat-core.list file diff --git a/buildcore.sh b/buildcore.sh index 77b44068b..bab8ce3b0 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -189,6 +189,7 @@ function setversionvars { BUILD_TIME=`date` BUILD_MACHINE=`hostname` COMMIT_ID=`git rev-parse --short HEAD` + COMMIT_ID_LONG=`git rev-parse HEAD` XCAT_RELEASE="snap$(date '+%Y%m%d%H%M')" echo "$XCAT_RELEASE" >Release } @@ -541,7 +542,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 @@ -549,6 +550,7 @@ echo "RELEASE=$XCAT_RELEASE" >> $BUILDINFO echo "BUILD_TIME=$BUILD_TIME" >> $BUILDINFO echo "BUILD_MACHINE=$BUILD_MACHINE" >> $BUILDINFO echo "COMMIT_ID=$COMMIT_ID" >> $BUILDINFO +echo "COMMIT_ID_LONG=$COMMIT_ID_LONG" >> $BUILDINFO echo "Creating $(dirname $DESTDIR)/$TARNAME ..." if [[ -e $TARNAME ]]; then