diff --git a/script/release-binary b/script/release-binary index bf83a7d3115..61d446533b8 100755 --- a/script/release-binary +++ b/script/release-binary @@ -19,24 +19,29 @@ set -ex # Make sure to this script on x86_64 Ubuntu Xenial +UBUNTU_RELEASE="$(lsb_release -c -s)" +[[ "${UBUNTU_RELEASE}" == 'xenial' ]] || { echo 'must run on Ubuntu Xenial'; exit 1; } # The bucket name to store proxy binary -BUCKET_NAME="istio-build/proxy" +DST="gs://istio-build/proxy" # The proxy binary name. SHA="$(git rev-parse --verify HEAD)" BINARY_NAME="envoy-alpha-${SHA}.tar.gz" SHA256_NAME="envoy-alpha-${SHA}.sha256" +# If binary already exists skip. +gsutil stat "${DST}/${BINARY_NAME}" \ + && { echo 'Binary already exists'; exit 0; } \ + || echo 'Building a new binary.' + # Build the binary bazel build --config=release //src/envoy/mixer:envoy_tar BAZEL_TARGET="bazel-bin/src/envoy/mixer/envoy_tar.tar.gz" ln "${BAZEL_TARGET}" "${BINARY_NAME}" sha256sum "${BINARY_NAME}" > "${SHA256_NAME}" -DST="gs://${BUCKET_NAME}/" # Copy it to the bucket. -echo "Copying ${BINARY_NAME} ${SHA256_NAME} to ${DST}" -gsutil cp "${BINARY_NAME}" "${SHA256_NAME}" "${DST}" - +echo "Copying ${BINARY_NAME} ${SHA256_NAME} to ${DST}/" +gsutil cp "${BINARY_NAME}" "${SHA256_NAME}" "${DST}/" diff --git a/src/envoy/mixer/repositories.bzl b/src/envoy/mixer/repositories.bzl index d5dfe4ac19c..1ec26f2a47c 100644 --- a/src/envoy/mixer/repositories.bzl +++ b/src/envoy/mixer/repositories.bzl @@ -15,10 +15,12 @@ ################################################################################ # +MIXER_CLIENT = "7b8544d765f9d7d86d28770c8d27d69cbf9509ac" + def mixer_client_repositories(bind=True): native.git_repository( name = "mixerclient_git", - commit = "7b8544d765f9d7d86d28770c8d27d69cbf9509ac", + commit = MIXER_CLIENT, remote = "https://github.com/istio/mixerclient.git", )