You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by dr...@apache.org on 2018/12/04 19:01:56 UTC

[incubator-openwhisk-devtools] branch master updated: [docker-compose] Fixed a bug in download-src (#180)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 4df31af  [docker-compose] Fixed a bug in download-src (#180)
4df31af is described below

commit 4df31af055b4e0ec5968acc7eb7f11b8d3aaa04a
Author: ddragosd <dd...@gmail.com>
AuthorDate: Tue Dec 4 11:01:49 2018 -0800

    [docker-compose] Fixed a bug in download-src (#180)
---
 docker-compose/Makefile  | 17 ++++++-----------
 docker-compose/README.md |  2 +-
 2 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/docker-compose/Makefile b/docker-compose/Makefile
index a2ec374..80e2564 100644
--- a/docker-compose/Makefile
+++ b/docker-compose/Makefile
@@ -46,20 +46,15 @@ add-catalog: download-catalog init-catalog
 
 .PHONY: download-src
 download-src:
-	if [ ! -d $(OPENWHISK_PROJECT_HOME) -o "$(OPENWHISK_VERSION)" = "master" ]; then \
-        echo "Downloading source tar ball $(OPENWHISK_VERSION)...."; \
-	    if [ "$(OPENWHISK_VERSION)" = "master" ]; then \
-	        rm -rf "$(OPENWHISK_PROJECT_HOME)"; \
-	        curl -o ./openwhisk-src.tar.gz -L https://github.com/apache/incubator-openwhisk/archive/master.tar.gz; \
-        elif [ "$(OPENWHISK_VERSION)" = "0.9.0" ]; then \
-	        curl -o ./openwhisk-src.tar.gz -L https://github.com/apache/incubator-openwhisk/archive/0.9.0-incubating.tar.gz; \
-        fi; \
-        echo "Unpacking tarball."; \
+	if [ ! $(OPENWHISK_PROJECT_HOME) = "./openwhisk-src" ]; then \
+		echo "Skipping downloading the code as OPENWHISK_PROJECT_HOME is set to " $(OPENWHISK_PROJECT_HOME); \
+	else \
+		rm -rf ./openwhisk-src; \
+		curl -o ./openwhisk-src.tar.gz -L https://github.com/apache/incubator-openwhisk/archive/$(OPENWHISK_VERSION).tar.gz; \
+		echo "Unpacking tarball."; \
 	    mkdir -p $(OPENWHISK_PROJECT_HOME); \
 	    tar -xf ./openwhisk-src.tar.gz --strip 1 -C $(OPENWHISK_PROJECT_HOME); \
 	    rm ./openwhisk-src.tar.gz; \
-	else \
-	     echo "Skipping downloading the code as OPENWHISK_PROJECT_HOME is set to " $(OPENWHISK_PROJECT_HOME); \
 	fi
 
 .PHONY: download-catalog
diff --git a/docker-compose/README.md b/docker-compose/README.md
index 3b07e05..30617f1 100644
--- a/docker-compose/README.md
+++ b/docker-compose/README.md
@@ -48,7 +48,7 @@ This is useful for working with a local clone, making changes to the code, and r
 This is the set of environment variables that can be set:
 
 * `OPENWHISK_PROJECT_HOME` - a checkout of [openwhisk](https://github.com/apache/incubator-openwhisk)
-* `OPENWHISK_VERSION` - defaults to `master` but can be set to [releases](https://github.com/apache/incubator-openwhisk/releases) such as `0.9.0`
+* `OPENWHISK_VERSION` - defaults to `master` but can be set to [releases](https://github.com/apache/incubator-openwhisk/releases) such as `0.9.0-incubating`
 * `OPENWHISK_CATALOG_HOME` - a checkout of [openwhisk-catalog](https://github.com/apache/incubator-openwhisk-catalog)
 * `WSK_CLI` - the directory where the [`wsk` command line tool](https://github.com/apache/incubator-openwhisk-cli) can be found
 * `DOCKER_IMAGE_PREFIX` - the prefix of the docker images used for actions. If you are building and testing checkouts of runtimes locally, then consider setting this to `whisk`.