diff --git a/BUILD b/BUILD index 37252ae00af1..2dde1330a56e 100644 --- a/BUILD +++ b/BUILD @@ -25,14 +25,6 @@ config_setting( visibility = ["//visibility:public"], ) -genrule( - name = "deb_version", - srcs = [], - outs = ["deb_version.txt"], - cmd = "echo $${ISTIO_VERSION:-\"0.3.0-dev\"} > \"$@\"", - visibility = ["//visibility:public"], -) - load("@io_bazel_rules_go//go:def.bzl", "go_prefix") go_prefix("istio.io/proxy") diff --git a/script/push-debian.sh b/script/push-debian.sh index 96c831788ab0..666271c214b4 100755 --- a/script/push-debian.sh +++ b/script/push-debian.sh @@ -23,6 +23,7 @@ # -p gs://istio-release/release/0.2.1/deb ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" +VERSION_FILE="${ROOT}/tools/deb/version" BAZEL_ARGS="" BAZEL_TARGET='//tools/deb:istio-proxy' BAZEL_BINARY="${ROOT}/bazel-bin/tools/deb/istio-proxy" @@ -55,8 +56,10 @@ while getopts ":c:o:p:v:" arg; do done if [[ -n "${ISTIO_VERSION}" ]]; then - BAZEL_ARGS+=" --action_env=ISTIO_VERSION" - export ISTIO_VERSION + BAZEL_TARGET+='-release' + BAZEL_BINARY+='-release' + echo "${ISTIO_VERSION}" > "${VERSION_FILE}" + trap 'rm "${VERSION_FILE}"' EXIT fi [[ -z "${GCS_PATH}" ]] && [[ -z "${OUTPUT_DIR}" ]] && usage diff --git a/tools/deb/BUILD b/tools/deb/BUILD index 09ac26911aaf..de0dfc6af25c 100644 --- a/tools/deb/BUILD +++ b/tools/deb/BUILD @@ -68,6 +68,20 @@ pkg_deb( maintainer = "The Istio Authors ", package = "istio-proxy", postinst = "postinst.sh", + version = "0.3-dev", +) + +pkg_deb( + name = "istio-proxy-release", + architecture = "amd64", + built_using = "bazel", + conffiles_file = "conffiles", + data = ":debian-data", + description_file = "description", + homepage = "http://istio.io", + maintainer = "The Istio Authors ", + package = "istio-proxy", + postinst = "postinst.sh", tags = ["manual"], - version_file = "//:deb_version", + version_file = "version", )