You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/03/27 08:50:37 UTC

[GitHub] daisy-ycguo closed pull request #69: Publish the binaries of openwhisk cli and wskdeploy

daisy-ycguo closed pull request #69: Publish the binaries of openwhisk cli and wskdeploy
URL: https://github.com/apache/incubator-openwhisk-release/pull/69
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.travis.yml b/.travis.yml
index b5baae4..9331e2b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -34,7 +34,7 @@ jobs:
     #- stage: deploy
     #  script: ./tools/travis/setup.sh
     - stage: package
-      script: ./tools/travis/package_source_code.sh $(dirname "$TRAVIS_BUILD_DIR") $SVN_USERNAME $SVN_PASSWORD
+      script: ./tools/travis/package_project.sh $(dirname "$TRAVIS_BUILD_DIR") $SVN_USERNAME $SVN_PASSWORD
 
 before_install:
   - if [ "$TRAVIS_PULL_REQUEST" == "false" ] ; then
diff --git a/tools/config.json b/tools/config.json
index 0d6743b..20cd582 100644
--- a/tools/config.json
+++ b/tools/config.json
@@ -26,14 +26,16 @@
     "branch": "master"
   },
   "openwhisk_wskdeploy": {
-    "hash": "c08d805",
+    "hash": "063263c",
     "repository": "https://github.com/apache/incubator-openwhisk-wskdeploy.git",
-    "branch": "master"
+    "branch": "master",
+    "binaries": "yes"
   },
   "openwhisk_cli": {
-    "hash": "ff385df",
+    "hash": "ba08720",
     "repository": "https://github.com/apache/incubator-openwhisk-cli.git",
-    "branch": "master"
+    "branch": "master",
+    "binaries": "yes"
   },
   "openwhisk_client_go": {
     "hash": "012fd0f",
diff --git a/tools/download_source_code.sh b/tools/download_source_code.sh
index f019e4e..a431465 100755
--- a/tools/download_source_code.sh
+++ b/tools/download_source_code.sh
@@ -38,9 +38,6 @@ function git_clone_repo() {
 
 rm -rf $OPENWHISK_SOURCE_DIR/*
 
-CONFIG=$(read_file $SCRIPTDIR/config.json)
-repos=$(echo $(json_by_key "$CONFIG" "RepoList") | sed 's/[][]//g')
-
 for repo in $(echo $repos | sed "s/,/ /g")
 do
     repo_name=$(echo "$repo" | sed -e 's/^"//' -e 's/"$//')
diff --git a/tools/package_binaries.sh b/tools/package_binaries.sh
new file mode 100755
index 0000000..d7eac66
--- /dev/null
+++ b/tools/package_binaries.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -e
+
+echo "Package the binaries."
+
+SCRIPTDIR="$(cd $(dirname "$0")/ && pwd)"
+source "$SCRIPTDIR/load_config.sh" $1 $2 $3
+
+for repo in $(echo $repos | sed "s/,/ /g")
+do
+    repo_name=$(echo "$repo" | sed -e 's/^"//' -e 's/"$//')
+    # Build the binaries
+    BINARIES=${repo_name//-/_}.binaries
+    PUBLISH_BINARIES=$(json_by_key "$CONFIG" $BINARIES)
+    if [ "$PUBLISH_BINARIES" == "yes" ] ; then
+        cd $OPENWHISK_SOURCE_DIR/$repo_name
+        ./gradlew releaseBinaries -PpackageVersion=${version}
+        # Copy all the binary artifacts into the directory ${CURRENT_VERSION_DIR}
+        cp -r release/. ${CURRENT_VERSION_DIR}/
+    fi
+done
diff --git a/tools/sign_artifacts.sh b/tools/sign_artifacts.sh
index e2a1975..e5cca17 100755
--- a/tools/sign_artifacts.sh
+++ b/tools/sign_artifacts.sh
@@ -36,7 +36,7 @@ fi
 
 cd $CURRENT_VERSION_DIR
 echo "Sign the artifacts with the private key."
-for artifact in *.tar.gz; do
+for artifact in *.tar.gz *.zip *.tgz; do
     gpg --print-md MD5 ${artifact} > ${artifact}.md5
     gpg --print-md SHA512 ${artifact} > ${artifact}.sha512
 
diff --git a/tools/travis/package_source_code.sh b/tools/travis/package_project.sh
similarity index 95%
rename from tools/travis/package_source_code.sh
rename to tools/travis/package_project.sh
index 9a54dee..6986ed5 100755
--- a/tools/travis/package_source_code.sh
+++ b/tools/travis/package_project.sh
@@ -37,6 +37,7 @@ fi
 
 
 "$PARENTDIR/package_source_code.sh" "$WORK_DIR" "$SVN_USERNAME" "$SVN_PASSWORD"
+"$PARENTDIR/package_binaries.sh" "$WORK_DIR" "$SVN_USERNAME" "$SVN_PASSWORD"
 
 if [ "$TRAVIS_EVENT_TYPE" == "push" ] && [ "$PUBLISH_STAGE" == "true" ] ; then
     "$CURRENTDIR/import_pgp_key.sh"


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services