#!/bin/bash
set -eux
if [ -z "$(which etcd)" ]; then
    ETCD_VERSION=3.0.6
    case `uname -s` in
        Darwin)
            OS=darwin
            SUFFIX=zip
            ;;
        Linux)
            OS=linux
            SUFFIX=tar.gz
            ;;
        *)
            echo "Unsupported OS"
            exit 1
    esac
    case `uname -m` in
         x86_64)
             MACHINE=amd64
             ;;
         *)
            echo "Unsupported machine"
            exit 1
    esac
    TARBALL_NAME=etcd-v${ETCD_VERSION}-$OS-$MACHINE
    test ! -d "$TARBALL_NAME" && curl -L https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/${TARBALL_NAME}.${SUFFIX} | tar xz
    export PATH=$PATH:$TARBALL_NAME
fi

$*

#!/bin/bash
set -eux
if [ -z "$(which etcd)" ]; then
    ETCD_VERSION=2.2.2
    case `uname -s` in
        Darwin)
            OS=darwin
            SUFFIX=zip
            ;;
        Linux)
            OS=linux
            SUFFIX=tar.gz
            ;;
        *)
            echo "Unsupported OS"
            exit 1
    esac
    case `uname -m` in
         x86_64)
             MACHINE=amd64
             ;;
         *)
            echo "Unsupported machine"
            exit 1
    esac
    TARBALL_NAME=etcd-v${ETCD_VERSION}-$OS-$MACHINE
    test ! -d "$TARBALL_NAME" && curl -L https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/${TARBALL_NAME}.${SUFFIX} | tar xz
    export PATH=$PATH:$TARBALL_NAME
fi

$*

--- 
+++ 
@@ -1,7 +1,7 @@
 #!/bin/bash
 set -eux
 if [ -z "$(which etcd)" ]; then
-    ETCD_VERSION=2.2.2
+    ETCD_VERSION=3.0.6
     case `uname -s` in
         Darwin)
             OS=darwin
Update etcd version in tests

Change-Id: Ie55a35c7d83a9512fa82385d333944a50f10ab93
Signed-off-by: Julien Danjou <5c682c2d1ec4073e277f9ba9f4bdf07e5794dabe@danjou.info>
