dart-sdk/third_party/d8/update.sh
Alexander Thomas 72fca58a11 [infra] Update d8 to 7.5.149
Change-Id: I1f1f86ec56d34c32d574f4862578d8a7888b6ac9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96903
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
2019-04-11 20:23:51 +00:00

42 lines
904 B
Bash
Executable file

#!/usr/bin/env bash
# Uploads a new version of d8 CIPD package
set -e
set -x
if [ -z "$1" ]; then
echo "Usage: update.sh version"
exit 1
fi
version=$1
major=$(echo "$version" | cut -d'.' -f1)
minor=$(echo "$version" | cut -d'.' -f2)
patch=$(echo "$version" | cut -d'.' -f3)
tmpdir=$(mktemp -d)
cleanup() {
rm -rf "$tmpdir"
}
trap cleanup EXIT HUP INT QUIT TERM PIPE
cd "$tmpdir"
arch=("linux64" "linux32" "linux64" "linux-arm32" "mac64" "win64")
path=("linux" "linux/ia32" "linux/x64" "linux/arm32" "macos" "windows")
for i in "${!arch[@]}"
do
filename="v8-${arch[$i]}-rel-$version.zip"
gsutil cp "gs://chromium-v8/official/canary/$filename" .
mkdir -p d8/${path[$i]}
unzip -q $filename -d d8/${path[$i]}
rm $filename
done
cipd create \
-name dart/d8 \
-in d8 \
-install-mode copy \
-tag version:$version \
-tag version:$major.$minor.$patch \
-tag version:$major.$minor