openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From houshen...@apache.org
Subject [incubator-openwhisk-release] branch master updated: Add the root directory to each repo when packaging the source code (#201)
Date Fri, 22 Jun 2018 17:16:12 GMT
This is an automated email from the ASF dual-hosted git repository.

houshengbo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-release.git


The following commit(s) were added to refs/heads/master by this push:
     new 5a708e6  Add the root directory to each repo when packaging the source code (#201)
5a708e6 is described below

commit 5a708e6d3db50a3819c102439c211b9dbed02752
Author: Vincent <shou@us.ibm.com>
AuthorDate: Fri Jun 22 13:16:09 2018 -0400

    Add the root directory to each repo when packaging the source code (#201)
    
    This PR adds a root directory when packaging the source code,
    and add the prefix for each repo to make the name complete.
    
    Closes: #195
---
 tools/download_source_code.sh | 5 +++--
 tools/package_source_code.sh  | 7 ++++---
 tools/verify_source_code.sh   | 5 +++--
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/tools/download_source_code.sh b/tools/download_source_code.sh
index 2df08a4..532a686 100755
--- a/tools/download_source_code.sh
+++ b/tools/download_source_code.sh
@@ -45,8 +45,9 @@ do
     HASH=$(json_by_key "$CONFIG" $HASH_KEY)
     REPO=$(json_by_key "$CONFIG" $REPO_KEY)
     BRANCH=$(json_by_key "$CONFIG" $REPO_BRANCH)
+    project_name="incubator-$repo_name"
     if [ "$HASH" != "null" ]; then
-        echo "The hash for $repo_name is $HASH"
-        git_clone_repo $repo_name $HASH $REPO $BRANCH
+        echo "The hash for $project_name is $HASH"
+        git_clone_repo $project_name $HASH $REPO $BRANCH
     fi
 done
diff --git a/tools/package_source_code.sh b/tools/package_source_code.sh
index 071428e..77295d6 100755
--- a/tools/package_source_code.sh
+++ b/tools/package_source_code.sh
@@ -35,7 +35,8 @@ rsync -rtp --exclude .bin --exclude .jshintrc --exclude .pydevproject --exclude
 for repo in $(echo $repos | sed "s/,/ /g")
 do
     repo_name=$(echo "$repo" | sed -e 's/^"//' -e 's/"$//')
-    cd $OPENWHISK_CLEANED_SOURCE_DIR/$repo_name
-    rm -rf .git
-    tar czf ${CURRENT_VERSION_DIR}/${repo_name}-${version}-sources.tar.gz .
+    project_name="incubator-$repo_name"
+    rm -rf $OPENWHISK_CLEANED_SOURCE_DIR/$project_name/.git
+    cd $OPENWHISK_CLEANED_SOURCE_DIR
+    tar czf ${CURRENT_VERSION_DIR}/${repo_name}-${version}-sources.tar.gz $project_name
 done
diff --git a/tools/verify_source_code.sh b/tools/verify_source_code.sh
index cc1c826..059c980 100755
--- a/tools/verify_source_code.sh
+++ b/tools/verify_source_code.sh
@@ -32,6 +32,7 @@ echo "Check the existence of LICENSE and NOTICE."
 for repo in $(echo $repos | sed "s/,/ /g")
 do
     repo_name=$(echo "$repo" | sed -e 's/^"//' -e 's/"$//')
-    echo "Check the repository $repo_name"
-    cd $OPENWHISK_SOURCE_DIR/$repo_name && ls {LICENSE*,NOTICE*}
+    project_name="incubator-$repo_name"
+    echo "Check the repository $project_name"
+    cd $OPENWHISK_SOURCE_DIR/$project_name && ls {LICENSE*,NOTICE*}
 done


Mime
View raw message