dart-sdk/third_party/firefox_jsshell/update.sh
Alexander Thomas 9ddfcd745f [infra] Upgrade jsshell to 88.0
* Use cipd for jsshell.
* Add script to update jsshell.
* Add new CIPD namespace, with access rights for some web team members.
* Add a copy of the new package to the old location (b/186078239).

Change-Id: I0169d077af6b0d5119fe8545272ca1df1596558f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196324
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-04-22 08:37:56 +00:00

38 lines
869 B
Bash
Executable file

#!/usr/bin/env bash
# Uploads a new version of the checked in JSShell CIPD packages
set -ex
if [ -z "$1" ]; then
echo "Usage: update.sh version"
exit 1
fi
tmpdir=$(mktemp -d)
cleanup() {
rm -rf "$tmpdir"
}
trap cleanup EXIT HUP INT QUIT TERM PIPE
pushd "$tmpdir"
ARCH=("linux-amd64" "mac-amd64" "windows-amd64")
URL=https://archive.mozilla.org/pub/firefox/releases/$1/jsshell
curl $URL/jsshell-linux-x86_64.zip --output jsshell-linux-amd64.zip
curl $URL/jsshell-mac.zip --output jsshell-mac-amd64.zip
curl $URL/jsshell-win64.zip --output jsshell-windows-amd64.zip
for a in "${ARCH[@]}"
do
filename="jsshell-$a.zip"
unzip -qj $filename -d jsshell
cipd create \
-name dart/third_party/jsshell/$a \
-in jsshell \
-install-mode copy \
-tag version:$1
rm $filename
rm -rf jsshell
done
popd
gclient setdep --var="jsshell_tag=version:$1"