From 9c1d637829df29f81df26db14493de83935ecf41 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Tue, 10 Jan 2017 09:45:06 -0500 Subject: [PATCH] Fix the issue with restoring the Release file because at the end of the buildcore.sh script, the CWD is not the git repo. Use full path Add the Release.save* file into the .gitignore in order to not track this temporary file during the build --- .gitignore | 2 ++ buildcore.sh | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e5d06cdf0..893951706 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ # ignore the documentation build files docs/build +# Ignore the temporary file for creating the Release version +Release.save* diff --git a/buildcore.sh b/buildcore.sh index 9ea023521..bff025def 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -35,6 +35,9 @@ # The following environment variables can be modified if you need # +SCRIPT=$(readlink -f $0) +SCRIPTPATH=`dirname $SCRIPT` + UPLOADUSER=litingt USER=xcat SERVER=xcat.org @@ -190,7 +193,7 @@ function setversionvars { echo "$XCAT_RELEASE" >Release } -RELEASE_FILE="Release" +RELEASE_FILE="${SCRIPTPATH}/Release" RELEASE_FILE_SAVE="${RELEASE_FILE}.save.998" function internal_backup() @@ -240,7 +243,6 @@ else echo "Error: Could not determine rpmbuild's root directory." exit 2 fi - #echo "source=$source" fi #