2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

Create a new variable to store the long commit ID incase

there are scripts already consuming the short commit ID
This commit is contained in:
Victor Hu 2017-04-26 13:19:47 -04:00
parent e64d8d8567
commit 3d7bd7bab3
2 changed files with 6 additions and 2 deletions

View File

@ -177,7 +177,8 @@ then
short_short_ver=`cat Version|cut -d. -f 1`
build_time=`date`
build_machine=`hostname`
commit_id=`git rev-parse HEAD`
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
@ -370,6 +371,7 @@ __EOF__
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

View File

@ -188,7 +188,8 @@ function setversionvars {
SHORTSHORTVER=`echo $VER|cut -d. -f 1`
BUILD_TIME=`date`
BUILD_MACHINE=`hostname`
COMMIT_ID=`git rev-parse HEAD`
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
}
@ -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