From df63c246382bbced06008dc736ebc868db8f522c Mon Sep 17 00:00:00 2001 From: Jonas Termansen Date: Fri, 21 Apr 2023 13:57:15 +0000 Subject: [PATCH] Checked in SDKs are now automatically uploaded. The official dart-sdk packages are now automatically built in the CI and developers will no longer need to build them manually when rolling the checked in SDK. The cipd instances are now tagged with the commit hash instead of the version number, which allows us multiple attempts at building a particular version (which different commits). Bug: b/279024347 Change-Id: I4bfb4a5384bb8c671b576afdac0e5008ccfcc8a1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296861 Reviewed-by: William Hesse Commit-Queue: Jonas Termansen --- tools/sdks/README | 10 +++-- tools/sdks/update.sh | 98 -------------------------------------------- 2 files changed, 6 insertions(+), 102 deletions(-) delete mode 100755 tools/sdks/update.sh diff --git a/tools/sdks/README b/tools/sdks/README index 0ef9f686b4e..0f4ce9a060d 100644 --- a/tools/sdks/README +++ b/tools/sdks/README @@ -6,7 +6,9 @@ The DEPS use CIPD's ${platform} syntax find the right SDK for the platform. We use the x64 build as the default on Linux, Mac and Windows. Builds for Linux on ARM and ARM64 are also provided. -To upload new versions of these CIPD packages, run "./update.sh" in this -directory. Because these SDKs are used for the presubmit dart format check on -changed files, they may need to be updated often when dart format is changing -rapidly. Access to the project-dart-admins Luci auth group is required to do so. +The SDK can be updated to a release commit from dev/beta/stable using: + + gclient setdep --var="sdk_tag=git_revision:$commit" + +Because these SDKs are used for the presubmit dart format check on changed +files, they may need to be updated often when dart format is changing rapidly. diff --git a/tools/sdks/update.sh b/tools/sdks/update.sh deleted file mode 100755 index 82af17d3ac4..00000000000 --- a/tools/sdks/update.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env bash -# Uploads a new version of the checked in SDK CIPD packages -set -e -set -x - -if [ -z "$1" ]; then - echo "Usage: update.sh version" - exit 1 -fi - -case "$1" in -*-*.0.dev) channel="dev";; -*-*.*.beta) channel="beta";; -*) channel="stable";; -esac - -tmpdir=$(mktemp -d) -cleanup() { - rm -rf "$tmpdir" -} -trap cleanup EXIT HUP INT QUIT TERM PIPE -pushd "$tmpdir" - -gsutil.py cp "gs://dart-archive/channels/$channel/release/$1/sdk/dartsdk-linux-x64-release.zip" . -unzip -q dartsdk-linux-x64-release.zip -d sdk -cipd create \ - -name dart/dart-sdk/linux-amd64 \ - -in sdk \ - -install-mode copy \ - -tag version:$1 \ - -ref $channel -rm -rf sdk - -gsutil.py cp "gs://dart-archive/channels/$channel/release/$1/sdk/dartsdk-linux-arm-release.zip" . -unzip -q dartsdk-linux-arm-release.zip -d sdk -cipd create \ - -name dart/dart-sdk/linux-arm \ - -in sdk \ - -install-mode copy \ - -tag version:$1 \ - -ref $channel -rm -rf sdk - -gsutil.py cp "gs://dart-archive/channels/$channel/release/$1/sdk/dartsdk-linux-arm64-release.zip" . -unzip -q dartsdk-linux-arm64-release.zip -d sdk -cipd create \ - -name dart/dart-sdk/linux-arm64 \ - -in sdk \ - -install-mode copy \ - -tag version:$1 \ - -ref $channel -rm -rf sdk - -if [ "$channel" = "dev" ]; then - gsutil.py cp "gs://dart-archive/channels/$channel/release/$1/sdk/dartsdk-linux-riscv64-release.zip" . - unzip -q dartsdk-linux-riscv64-release.zip -d sdk - cipd create \ - -name dart/dart-sdk/linux-riscv64 \ - -in sdk \ - -install-mode copy \ - -tag version:$1 \ - -ref $channel - rm -rf sdk -fi - -gsutil.py cp "gs://dart-archive/channels/$channel/release/$1/sdk/dartsdk-macos-x64-release.zip" . -unzip -q dartsdk-macos-x64-release.zip -d sdk -cipd create \ - -name dart/dart-sdk/mac-amd64 \ - -in sdk \ - -install-mode copy \ - -tag version:$1 \ - -ref $channel -rm -rf sdk - -gsutil.py cp "gs://dart-archive/channels/$channel/release/$1/sdk/dartsdk-macos-arm64-release.zip" . -unzip -q dartsdk-macos-arm64-release.zip -d sdk -cipd create \ - -name dart/dart-sdk/mac-arm64 \ - -in sdk \ - -install-mode copy \ - -tag version:$1 \ - -ref $channel -rm -rf sdk - -gsutil.py cp "gs://dart-archive/channels/$channel/release/$1/sdk/dartsdk-windows-x64-release.zip" . -unzip -q dartsdk-windows-x64-release.zip -d sdk -cipd create \ - -name dart/dart-sdk/windows-amd64 \ - -in sdk \ - -install-mode copy \ - -tag version:$1 \ - -ref $channel -rm -rf sdk - -popd - -gclient setdep --var="sdk_tag=version:$1"