You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by du...@apache.org on 2018/03/22 17:03:10 UTC

[incubator-openwhisk-cli] branch master updated: Add the support to specify the version of the binaries (#251)

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 79d8862  Add the support to specify the version of the binaries (#251)
79d8862 is described below

commit 79d886253d93417d004f9d7ce6e7c32cb7672b7b
Author: Vincent <sh...@us.ibm.com>
AuthorDate: Thu Mar 22 13:03:07 2018 -0400

    Add the support to specify the version of the binaries (#251)
    
    * Add the support to specify the version of the binaries
    
    This PR changes the task name from release to releaseBinaries in
    order to make it consistent in the release process. It also adds
    packageVersion as a parameter to specify the version of the binaries
    to be released.
    
    Partially-closes: apache/incubator-openwhisk-release#9
    
    * Make the parameter "packageVersion" a project extention
---
 .travis.yml                    |  2 +-
 build.gradle                   | 11 +++++++----
 tools/travis/test_openwhisk.sh |  2 +-
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 7ecf33c..7e84813 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -55,7 +55,7 @@ script:
   - cd $TRAVIS_BUILD_DIR/../incubator-openwhisk
   - ./gradlew install
   - cd $TRAVIS_BUILD_DIR
-  - ./gradlew --console=plain release
+  - ./gradlew --console=plain releaseBinaries
   - ./tools/travis/test_openwhisk.sh
 
 after_success:
diff --git a/build.gradle b/build.gradle
index a7b321d..3724b38 100644
--- a/build.gradle
+++ b/build.gradle
@@ -121,6 +121,9 @@ OpenWhiskPlatform.zipFileName =
     System.env['zip_file_name'] ?:
         (rootProject.findProperty('zipFileName') ?: 'OpenWhisk_CLI')
 
+project.ext.packageVersion =
+        rootProject.findProperty('packageVersion') ?: 'latest'
+
 String buildFileName = System.env['build_file_name'] ?:
         (rootProject.findProperty('buildFileName') ?: 'wsk')
 
@@ -214,7 +217,7 @@ task individualArchives(
             type: (p.goOs == 'linux') ? Tar : Zip, dependsOn: compile) {
                 if (p.goOs == 'linux') { compression = Compression.GZIP }
                 destinationDir = file('./release')
-                baseName = "${p.zipFileName}-latest-${p.owOs}-${p.goArch}"
+                baseName = "${p.zipFileName}-${packageVersion}-${p.owOs}-${p.goArch}"
                 from "./build/${p.goOs}-${p.goArch}/"
                 include "${buildFileName}*"
             }
@@ -243,14 +246,14 @@ task index() {
     }
 }
 
-task release(type: Tar, dependsOn: [individualArchives, index]) {
+task releaseBinaries(type: Tar, dependsOn: [individualArchives, index]) {
     compression = Compression.GZIP
     destinationDir = file('./release')
-    baseName = "${OpenWhiskPlatform.zipFileName}-latest-all"
+    baseName = "${OpenWhiskPlatform.zipFileName}-${packageVersion}-all"
     from('./build/content.json') { into('.') }
     rootProject.platforms.each() { p ->
         from('./release/') {
-            include("${p.zipFileName}-latest-${p.owOs}-${p.goArch}.*")
+            include("${p.zipFileName}-${packageVersion}-${p.owOs}-${p.goArch}.*")
             into p.archiveDirName
             rename { p.archiveFileName }
         }
diff --git a/tools/travis/test_openwhisk.sh b/tools/travis/test_openwhisk.sh
index 8d2453e..78b3b78 100755
--- a/tools/travis/test_openwhisk.sh
+++ b/tools/travis/test_openwhisk.sh
@@ -7,7 +7,7 @@ set -e
 #  the release.  If you're running manually, this command should get you to
 #  the same place:
 #
-#    ./gradlew release
+#    ./gradlew releaseBinaries
 #
 #  Also at this point, you should already have incubator-openwhisk pulled down
 #  from gradle in the parent directory, using a command such as:

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