mrutkows closed pull request #67: Add the config option to determine whether to 
push the artifacts or not
URL: https://github.com/apache/incubator-openwhisk-release/pull/67
 
 
   

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/tools/config.json b/tools/config.json
index 6fdbed9..cac2d34 100644
--- a/tools/config.json
+++ b/tools/config.json
@@ -1,4 +1,5 @@
 {
+  "publish_stage": "false",
   "stage_url": "https://dist.apache.org/repos/dist/dev/incubator/openwhisk";,
   "release_url": 
"https://dist.apache.org/repos/dist/release/incubator/openwhisk";,
   "version": {
diff --git a/tools/load_config.sh b/tools/load_config.sh
index 43b233d..6e19354 100755
--- a/tools/load_config.sh
+++ b/tools/load_config.sh
@@ -17,10 +17,10 @@
 #
 
 WORK_DIR=${1:-"$HOME"}
-SCRIPTDIR="$(cd $(dirname "$0")/ && pwd)"
-
+DIR="$(cd $(dirname "$0")/ && pwd)"
 SVN_USERNAME=$2
 SVN_PASSWORD=$3
+SCRIPTDIR=${4:-"$DIR"}
 CREDENTIALS=""
 
 if [ ! -z "$SVN_USERNAME" ] && [ ! -z "$SVN_PASSWORD" ];then
@@ -35,6 +35,7 @@ OPENWHISK_SVN="$OPENWHISK_RELEASE_DIR/openwhisk"
 source "$SCRIPTDIR/util.sh"
 
 CONFIG=$(read_file $SCRIPTDIR/config.json)
+PUBLISH_STAGE=$(json_by_key "$CONFIG" "publish_stage")
 repos=$(echo $(json_by_key "$CONFIG" "RepoList") | sed 's/[][]//g')
 STAGE_URL=$(json_by_key "$CONFIG" "stage_url")
 
diff --git a/tools/travis/package_source_code.sh 
b/tools/travis/package_source_code.sh
index aa0585d..79bd7ec 100755
--- a/tools/travis/package_source_code.sh
+++ b/tools/travis/package_source_code.sh
@@ -27,16 +27,19 @@ PARENTDIR="$(dirname "$SCRIPTDIR")"
 SVN_USERNAME=$2
 SVN_PASSWORD=$3
 
+source "$PARENTDIR/load_config.sh" "$WORK_DIR" "$SVN_USERNAME" "$SVN_PASSWORD" 
"$PARENTDIR"
+
 "$PARENTDIR/install_dependencies.sh"
-"$PARENTDIR/download_source_code.sh" $WORK_DIR
-"$PARENTDIR/checkout_svn.sh" $WORK_DIR $SVN_USERNAME $SVN_PASSWORD
+"$PARENTDIR/download_source_code.sh" "$WORK_DIR"
+"$PARENTDIR/checkout_svn.sh" "$WORK_DIR" "$SVN_USERNAME" "$SVN_PASSWORD"
+
 
-"$PARENTDIR/package_source_code.sh" $WORK_DIR $SVN_USERNAME $SVN_PASSWORD
+"$PARENTDIR/package_source_code.sh" "$WORK_DIR" "$SVN_USERNAME" "$SVN_PASSWORD"
 
-if [ "$TRAVIS_EVENT_TYPE" == "push" ] ; then
+if [ "$TRAVIS_EVENT_TYPE" == "push" ] && [ "$PUBLISH_STAGE" == "true" ] ; then
     "$SCRIPTDIR/import_pgp_key.sh"
-    "$PARENTDIR/sign_artifacts.sh" $WORK_DIR
-    "$PARENTDIR/upload_artifacts.sh" $WORK_DIR $SVN_USERNAME $SVN_PASSWORD
+    "$PARENTDIR/sign_artifacts.sh" "$WORK_DIR"
+    "$PARENTDIR/upload_artifacts.sh" "$WORK_DIR" "$SVN_USERNAME" 
"$SVN_PASSWORD"
 fi
 
-"$PARENTDIR/verify_source_code.sh" $WORK_DIR
+"$PARENTDIR/verify_source_code.sh" "$WORK_DIR"


 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to