openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mrutkow...@apache.org
Subject [incubator-openwhisk-release] branch master updated: Add the support to create the release when the git tag is added (#149)
Date Mon, 14 May 2018 19:00:48 GMT
This is an automated email from the ASF dual-hosted git repository.

mrutkowski 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 f3fcd2d  Add the support to create the release when the git tag is added (#149)
f3fcd2d is described below

commit f3fcd2d9d7d743ae84f24a42b320a336ca95225f
Author: Vincent <shou@us.ibm.com>
AuthorDate: Mon May 14 15:00:46 2018 -0400

    Add the support to create the release when the git tag is added (#149)
---
 tools/load_config.sh            |  5 +++--
 tools/travis/package_project.sh | 38 ++++++++++++++++++++++----------------
 2 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/tools/load_config.sh b/tools/load_config.sh
index e70f7a5..035051d 100755
--- a/tools/load_config.sh
+++ b/tools/load_config.sh
@@ -41,9 +41,10 @@ STAGE_URL=$(json_by_key "$CONFIG" "stage_url")
 RELEASE_URL=$(json_by_key "$CONFIG" "release_url")
 
 version_key="versioning"
-version=$(json_by_key "$CONFIG" ${version_key}.version)
+version_json=$(json_by_key "$CONFIG" ${version_key}.version)
+version=${5:-"$version_json"}
 pre_release_version=$(json_by_key "$CONFIG" ${version_key}.pre_release_version)
-full_version=$version
+full_version=$version_json
 
 if [ ! -z "$pre_release_version" ]; then
     pre_release_version_no_space="$(echo -e "${pre_release_version}" | tr -d '[[:space:]]')"
diff --git a/tools/travis/package_project.sh b/tools/travis/package_project.sh
index 6986ed5..9df0258 100755
--- a/tools/travis/package_project.sh
+++ b/tools/travis/package_project.sh
@@ -27,22 +27,28 @@ PARENTDIR="$(dirname "$CURRENTDIR")"
 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"
-if [ "$TRAVIS_EVENT_TYPE" == "push" ] && [ "$PUBLISH_STAGE" == "true" ] ; then
-    "$PARENTDIR/checkout_svn.sh" "$WORK_DIR" "$SVN_USERNAME" "$SVN_PASSWORD"
-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"
-    "$PARENTDIR/sign_artifacts.sh" "$WORK_DIR"
-    "$PARENTDIR/upload_artifacts.sh" "$WORK_DIR" "$SVN_USERNAME" "$SVN_PASSWORD"
+if [ ! -z "$TRAVIS_TAG" ] ; then
+    # The git tag is named after the version to be released.
+    release_version=$TRAVIS_TAG
+    source "$PARENTDIR/load_config.sh" "$WORK_DIR" "$SVN_USERNAME" "$SVN_PASSWORD" "$PARENTDIR"
"$release_version"
+    "$PARENTDIR/move_stage_to_release.sh" "$WORK_DIR" "$SVN_USERNAME" "$SVN_PASSWORD"
+else
+    source "$PARENTDIR/load_config.sh" "$WORK_DIR" "$SVN_USERNAME" "$SVN_PASSWORD" "$PARENTDIR"
+    "$PARENTDIR/download_source_code.sh" "$WORK_DIR"
+    if [ "$TRAVIS_EVENT_TYPE" == "push" ] && [ "$PUBLISH_STAGE" == "true" ] ; then
+        "$PARENTDIR/checkout_svn.sh" "$WORK_DIR" "$SVN_USERNAME" "$SVN_PASSWORD"
+    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"
+        "$PARENTDIR/sign_artifacts.sh" "$WORK_DIR"
+        "$PARENTDIR/upload_artifacts.sh" "$WORK_DIR" "$SVN_USERNAME" "$SVN_PASSWORD"
+    fi
+
+    "$PARENTDIR/verify_source_code.sh" "$WORK_DIR"
 fi
-
-"$PARENTDIR/verify_source_code.sh" "$WORK_DIR"

-- 
To stop receiving notification emails like this one, please contact
mrutkowski@apache.org.

Mime
View raw message