From fa5e3c299ea1cab73b09ee1adc34708febb8890c Mon Sep 17 00:00:00 2001 From: sunghan Date: Thu, 13 Apr 2017 14:23:56 +0900 Subject: [PATCH] set BUILD variable to NA(Not Available) when there is no .git MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If Tizen RT is tried to build without .git, below error is shown. We should make Tizen RT can be built regardless of existing of .git. No .version file found, creating one GIT version information is not available chmod: cannot access ‘.version’: No such file or directory make: *** [/os/.version] Error 1 --- os/tools/version.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/os/tools/version.sh b/os/tools/version.sh index 1cfeb2f..67d7093 100755 --- a/os/tools/version.sh +++ b/os/tools/version.sh @@ -135,12 +135,13 @@ if [ -z "${BUILD}" ]; then GITINFO=`git log 2>/dev/null | head -1` if [ -z "${GITINFO}" ]; then echo "GIT version information is not available" - exit 3 - fi - BUILD=`echo ${GITINFO} | cut -d' ' -f2` - if [ -z "${BUILD}" ]; then - echo "GIT build information not found" - exit 4 + BUILD=NA + else + BUILD=`echo ${GITINFO} | cut -d' ' -f2` + if [ -z "${BUILD}" ]; then + echo "GIT build information not found" + BUILD=NA + fi fi fi -- 2.7.4