From 272faba1c0ae2a7513bd020865f083adf83025ed Mon Sep 17 00:00:00 2001 From: Alexander Aprelev Date: Tue, 13 Jun 2017 08:28:16 -0700 Subject: [PATCH] Support 'be' channel so you can download dart-sdk from the tip. (#10625) * Support 'be' channel so you can download dart-sdk from the tip. This is triggered when you put 'hash/' into dart-sdk.version file. For example, 'hash/c0617d20158955d99d6447036237fe2639ba088c' * Add README.md * Fix grammar, spacing, 80 chars, nicer === --- bin/internal/README.md | 10 ++++++++++ bin/internal/update_dart_sdk.ps1 | 2 +- bin/internal/update_dart_sdk.sh | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 bin/internal/README.md diff --git a/bin/internal/README.md b/bin/internal/README.md new file mode 100644 index 00000000000..e051a56be09 --- /dev/null +++ b/bin/internal/README.md @@ -0,0 +1,10 @@ +Dart SDK dependency +=================== + +The Dart SDK is downloaded from one of [the supported channels](https://www.dartlang.org/install/archive), +cached in `bin/cache/dart-sdk` and is used to run Flutter Dart code. + +The file `bin/internal/dart-sdk.version` determines the version of Dart SDK +that will be downloaded. Normally it points to the `dev` channel (for example, +`1.24.0-dev.6.7`), but it can also point to particular bleeding edge build +of Dart (for example, `hash/c0617d20158955d99d6447036237fe2639ba088c`). \ No newline at end of file diff --git a/bin/internal/update_dart_sdk.ps1 b/bin/internal/update_dart_sdk.ps1 index 8767d1d98f3..1f16cb6ebb6 100644 --- a/bin/internal/update_dart_sdk.ps1 +++ b/bin/internal/update_dart_sdk.ps1 @@ -29,7 +29,7 @@ if ((Test-Path $dartSdkStampPath) -and ($dartSdkVersion -eq (Get-Content $dartSd Write-Host "Downloading Dart SDK $dartSdkVersion..." $dartZipName = "dartsdk-windows-x64-release.zip" -$dartChannel = if ($dartSdkVersion.Contains("-dev.")) {"dev"} else {"stable"} +$dartChannel = if ($dartSdkVersion.Contains("-dev.")) {"dev"} else {if ($dartSdkVersion.Contains("hash/")) {"be"} else {"stable"}} $dartSdkUrl = "https://storage.googleapis.com/dart-archive/channels/$dartChannel/raw/$dartSdkVersion/sdk/$dartZipName" if (Test-Path $dartSdkPath) { diff --git a/bin/internal/update_dart_sdk.sh b/bin/internal/update_dart_sdk.sh index cbff31ca74b..80e8f6e4ed7 100755 --- a/bin/internal/update_dart_sdk.sh +++ b/bin/internal/update_dart_sdk.sh @@ -41,6 +41,9 @@ if [ ! -f "$DART_SDK_STAMP_PATH" ] || [ "$DART_SDK_VERSION" != `cat "$DART_SDK_S if [[ $DART_SDK_VERSION == *"-dev."* ]] then DART_CHANNEL="dev" + elif [[ $DART_SDK_VERSION == "hash/"* ]] + then + DART_CHANNEL="be" fi DART_SDK_URL="https://storage.googleapis.com/dart-archive/channels/$DART_CHANNEL/raw/$DART_SDK_VERSION/sdk/$DART_ZIP_NAME"