aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/internal_ci
diff options
context:
space:
mode:
authorGravatar Mehrdad Afshari <mmx@google.com>2018-07-24 17:50:37 -0700
committerGravatar Mehrdad Afshari <mmx@google.com>2018-07-24 17:50:37 -0700
commit4dbe919ec29e101344344a2b5fda70746ba0b77f (patch)
treeda784d2ab2f96f040998223da677e7e628be0283 /tools/internal_ci
parenta3939fd9d588f60bc586e8202bef83d74b078b92 (diff)
Add version number to protoc packages
Diffstat (limited to 'tools/internal_ci')
-rwxr-xr-x[-rw-r--r--]tools/internal_ci/linux/grpc_publish_packages.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/internal_ci/linux/grpc_publish_packages.sh b/tools/internal_ci/linux/grpc_publish_packages.sh
index fecb9a5e09..1459364d57 100644..100755
--- a/tools/internal_ci/linux/grpc_publish_packages.sh
+++ b/tools/internal_ci/linux/grpc_publish_packages.sh
@@ -17,6 +17,10 @@ set -ex
shopt -s nullglob
+cd "$(dirname "$0")/../../.."
+
+GRPC_VERSION=$(grep -e "^ *version: " build.yaml | head -n 1 | sed 's/.*: //')
+
INPUT_ARTIFACTS=$KOKORO_GFILE_DIR/github/grpc/artifacts
INDEX_FILENAME=index.xml
@@ -43,17 +47,17 @@ find "$INPUT_ARTIFACTS" -type f
PROTOC_PLUGINS_ZIPPED_PACKAGES=$(mktemp -d)
for zip_dir in protoc_windows_{x86,x64}
do
- zip -jr "$PROTOC_PLUGINS_ZIPPED_PACKAGES/$zip_dir.zip" "$INPUT_ARTIFACTS/$zip_dir/"*
+ zip -jr "$PROTOC_PLUGINS_ZIPPED_PACKAGES/grpc-$zip_dir-$GRPC_VERSION.zip" "$INPUT_ARTIFACTS/$zip_dir/"*
done
for tar_dir in protoc_{linux,macos}_{x86,x64}
do
chmod +x "$INPUT_ARTIFACTS/$tar_dir"/*
- tar -cvzf "$PROTOC_PLUGINS_ZIPPED_PACKAGES/$tar_dir.tar.gz" -C "$INPUT_ARTIFACTS/$tar_dir" .
+ tar -cvzf "$PROTOC_PLUGINS_ZIPPED_PACKAGES/grpc-$tar_dir-$GRPC_VERSION.tar.gz" -C "$INPUT_ARTIFACTS/$tar_dir" .
done
PROTOC_PACKAGES=(
- "$PROTOC_PLUGINS_ZIPPED_PACKAGES"/protoc_windows_{x86,x64}.zip
- "$PROTOC_PLUGINS_ZIPPED_PACKAGES"/protoc_{linux,macos}_{x86,x64}.tar.gz
+ "$PROTOC_PLUGINS_ZIPPED_PACKAGES"/grpc-protoc_windows_{x86,x64}-"$GRPC_VERSION.zip"
+ "$PROTOC_PLUGINS_ZIPPED_PACKAGES"/grpc-protoc_{linux,macos}_{x86,x64}-"$GRPC_VERSION.tar.gz"
)
# C#