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 2017/12/22 17:22:14 UTC

[GitHub] jonpspri closed pull request #171: Add s390x architecture; better build loop control.

jonpspri closed pull request #171: Add s390x architecture; better build loop control.
URL: https://github.com/apache/incubator-openwhisk-cli/pull/171
 
 
   

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/travis/build_tag_releases.sh b/tools/travis/build_tag_releases.sh
index a5dc9a0f..ed6fbe90 100755
--- a/tools/travis/build_tag_releases.sh
+++ b/tools/travis/build_tag_releases.sh
@@ -1,29 +1,37 @@
 #!/usr/bin/env bash
 
-declare -a os_list=("linux" "windows" "darwin")
-declare -a arc_list=("amd64" "386")
+#  Currently supported combinations of OS and Architecture
+declare -a builds=(
+    "linux amd64"
+    "linux 386"
+    "linux s390x"
+    "darwin amd64"
+    "darwin 386"
+    "windows amd64"
+    "windows 386"
+)
+
 build_file_name=${1:-"wsk"}
 zip_file_name=${2:-"OpenWhisk_CLI"}
 
-for os in "${os_list[@]}"
+for build in "${builds[@]}"
 do
-    for arc in "${arc_list[@]}"
-    do
-        wsk=$build_file_name
-        os_name=$os
-        if [ "$os" == "windows" ]; then
-            wsk="$wsk.exe"
-        fi
-        if [ "$os" == "darwin" ]; then
-            os_name="mac"
-        fi
-        cd $TRAVIS_BUILD_DIR
-        GOOS=$os GOARCH=$arc go build -ldflags "-X main.CLI_BUILD_TIME=`date -u '+%Y-%m-%dT%H:%M:%S%:z'`" -o build/$os/$arc/$wsk
-        cd build/$os/$arc
-        if [[ "$os" == "linux" ]]; then
-            tar -czvf "$TRAVIS_BUILD_DIR/$zip_file_name-$TRAVIS_TAG-$os_name-$arc.tgz" $wsk
-        else
-            zip -r "$TRAVIS_BUILD_DIR/$zip_file_name-$TRAVIS_TAG-$os_name-$arc.zip" $wsk
-        fi
-    done
+    # A little bash foo to tokenize the build string
+    IFS=' ' read os arc <<< "${build}"
+    wsk=$build_file_name
+    os_name=$os
+    if [ "$os" == "windows" ]; then
+        wsk="$wsk.exe"
+    fi
+    if [ "$os" == "darwin" ]; then
+        os_name="mac"
+    fi
+    cd $TRAVIS_BUILD_DIR || exit
+    GOOS=$os GOARCH=$arc go build -ldflags "-X main.CLI_BUILD_TIME=`date -u '+%Y-%m-%dT%H:%M:%S%:z'`" -o build/$os/$arc/$wsk
+    cd build/$os/$arc || exit
+    if [[ "$os" == "linux" ]]; then
+        tar -czvf "$TRAVIS_BUILD_DIR/$zip_file_name-$TRAVIS_TAG-$os_name-$arc.tgz" $wsk
+    else
+        zip -r "$TRAVIS_BUILD_DIR/$zip_file_name-$TRAVIS_TAG-$os_name-$arc.zip" $wsk
+    fi
 done


 

----------------------------------------------------------------
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