This is an automated email from the ASF dual-hosted git repository.
rjung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git
The following commit(s) were added to refs/heads/master by this push:
new f8ac1c6 Allow jni release script to run outside of a git workspace.
The old svn based script supported this.
f8ac1c6 is described below
commit f8ac1c69f7b943bc2ffd82cb93e550e456dfae0c
Author: Rainer Jung <[email protected]>
AuthorDate: Thu Jun 27 01:05:39 2019 +0200
Allow jni release script to run outside
of a git workspace. The old svn based script
supported this.
---
jnirelease.sh | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/jnirelease.sh b/jnirelease.sh
index 8fe7fe7..97413fb 100755
--- a/jnirelease.sh
+++ b/jnirelease.sh
@@ -134,24 +134,34 @@ else
fi
if [ "x$JKJNIEXT" = "xmaster" ]; then
- JKJNIHASH=`git rev-parse --short origin/master`
+ JKJNIHASH=`git ls-remote $GITBASE refs/heads/master | awk '{print $1}'`
JKJNIVER="$JKJNIEXT-$JKJNIHASH"
elif [ "x$JKJNIEXT" = "x1.1.x" ]; then
- JKJNIHASH=`git rev-parse --short origin/1.1.x`
+ JKJNIHASH=`git ls-remote $GITBASE refs/heads/1.1.x | awk '{print $1}'`
JKJNIVER="$JKJNIEXT-$JKJNIHASH"
elif [ "x$JKJNIEXT" = "x." ]; then
JKJNIHASH=`git rev-parse --short HEAD`
JKJNIVER="HEAD-$JKJNIHASH"
else
- JKJNIHASH=`git rev-parse --short refs/tags/$JKJNIEXT`
+ JKJNIHASH=`git ls-remote $GITBASE refs/tags/$JKJNIEXT | awk '{print $1}'`
JKJNIVER="$JKJNIEXT"
JKJNIREL=1
fi
echo "Using GIT repo : \`${GITBASE}\`"
echo "Using version : \`${JKJNIVER}\`"
-# Checking for recentness of git subtree
-git checkout ${JKJNIHASH}
+if [ ! -d .git ]; then
+ rm -rf tmp-clone
+ git clone --no-checkout $GITBASE tmp-clone
+ mv tmp-clone/.git .
+ rm -rf tmp-clone
+ # Checking for recentness of git subtree
+ git checkout --force ${JKJNIHASH}
+else
+ # Checking for recentness of git subtree
+ git checkout ${JKJNIHASH}
+fi
+
if [ ! -d .git/refs/remotes/9.0.x ]; then
git remote add -f 9.0.x ${TCJAVA_GITBASE}
fi
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]