You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2015/10/09 17:50:41 UTC

[24/30] incubator-tinkerpop git commit: vaidate source distribution

vaidate source distribution


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/6e00aeb6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/6e00aeb6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/6e00aeb6

Branch: refs/heads/TINKERPOP3-876
Commit: 6e00aeb6cd1910fb705fb8c2ae434a05d47cbbd1
Parents: 37732ce
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Fri Oct 9 15:32:29 2015 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Fri Oct 9 15:32:29 2015 +0200

----------------------------------------------------------------------
 bin/validate-distribution.sh | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6e00aeb6/bin/validate-distribution.sh
----------------------------------------------------------------------
diff --git a/bin/validate-distribution.sh b/bin/validate-distribution.sh
index 8bde519..79fab11 100755
--- a/bin/validate-distribution.sh
+++ b/bin/validate-distribution.sh
@@ -33,6 +33,7 @@ if [ -z ${URL} ]; then
 
   CONSOLE_URL="https://www.apache.org/dist/incubator/tinkerpop/${VERSION}/apache-gremlin-console-${VERSION}-bin.zip"
   SERVER_URL="https://www.apache.org/dist/incubator/tinkerpop/${VERSION}/apache-gremlin-server-${VERSION}-bin.zip"
+  SOURCE_URL="https://www.apache.org/dist/incubator/tinkerpop/${VERSION}/apache-tinkerpop-${VERSION}-src.zip"
 
   echo -e "\nValidating binary distributions\n"
 
@@ -45,6 +46,12 @@ if [ -z ${URL} ]; then
     EXIT_CODE=$?
   fi
 
+  if [ ${EXIT_CODE} -eq 0 ]; then
+    echo -e "\nValidating source distribution\n"
+    ${0} ${VERSION} ${SOURCE_URL} "SOURCE"
+    EXIT_CODE=$?
+  fi
+
   [[ ${EXIT_CODE} -eq 0 ]] && rm -rf ${TMP_DIR}
 
   echo && exit ${EXIT_CODE}
@@ -57,7 +64,11 @@ cd ${TMP_DIR}
 # validate downloads
 ZIP_FILENAME=`grep -o '[^/]*$' <<< ${URL}`
 DIR_NAME=`sed -e 's/-[^-]*$//' <<< ${ZIP_FILENAME}`
-COMPONENT=`tr '-' $'\n' <<< ${ZIP_FILENAME} | head -n3 | sed -e 's/^./\U&/' | paste -sd ' '`
+COMPONENT=`tr '-' $'\n' <<< ${ZIP_FILENAME} | head -n3 | sed -e 's/^./\U&/' | paste -sd ' ' -`
+
+if [ "${TYPE}" = "SOURCE" ]; then
+  DIR_NAME=`sed -e 's/^[^-]*-//' <<< ${DIR_NAME}`
+fi
 
 echo -n "* downloading ${COMPONENT} (${ZIP_FILENAME})... "
 curl -Ls ${URL} -o ${ZIP_FILENAME}
@@ -93,6 +104,14 @@ unzip -q ${ZIP_FILENAME} || { echo "Failed to unzip ${COMPONENT}"; exit 1; }
 [ -d ${DIR_NAME} ] || { echo "${COMPONENT} was not extracted into the expected directory"; exit 1; }
 echo "OK"
 
+if [ "${TYPE}" = "SOURCE" ]; then
+cd ${DIR_NAME}
+echo -n "* building project ... "
+mvn clean install -Dmaven.test.skip=true 2>&1 > /dev/null || { echo "failed"; exit 1; }
+echo "OK"
+exit 0
+fi
+
 # validate docs/ and javadocs/ directories
 echo -n "* validating ${COMPONENT}'s docs ... "
 cd ${DIR_NAME}