You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by nw...@apache.org on 2019/04/26 04:35:37 UTC
[incubator-heron] branch master updated: Fix build when the source
code is not managed by git (#3245)
This is an automated email from the ASF dual-hosted git repository.
nwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git
The following commit(s) were added to refs/heads/master by this push:
new ad10325 Fix build when the source code is not managed by git (#3245)
ad10325 is described below
commit ad10325a0febe89ad337e561ebcbe37ec5d9a5ac
Author: Ning Wang <nw...@twitter.com>
AuthorDate: Thu Apr 25 21:35:27 2019 -0700
Fix build when the source code is not managed by git (#3245)
---
scripts/release/status.sh | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/scripts/release/status.sh b/scripts/release/status.sh
index 925b395..33d55a4 100755
--- a/scripts/release/status.sh
+++ b/scripts/release/status.sh
@@ -43,9 +43,10 @@ function disable_e_and_execute {
}
# get the release tag version or the branch name
-if [ -d .git ];
+if [ -z ${HERON_BUILD_VERSION+x} ];
then
- if [ -z ${HERON_BUILD_VERSION+x} ];
+ # variable HERON_BUILD_VERSION is not available, use git branch as build version
+ if [ -d .git ];
then
cmd="git rev-parse --abbrev-ref HEAD"
build_version=$($cmd) || die "Failed to run command to check head: $cmd"
@@ -56,9 +57,12 @@ then
build_version=$($cmd) || die "Failed to run command to get git release: $cmd"
fi
else
- build_version=${HERON_BUILD_VERSION}
+ # not git managed, use current dir as build version
+ current_dir=$(pwd)
+ build_version=$(basename "$current_dir")
fi
else
+ # variable HERON_BUILD_VERSION is available, use it.
build_version=${HERON_BUILD_VERSION}
fi
echo "HERON_BUILD_VERSION ${build_version}"