Move Dart SDK and Flutter forks to GitHub
This commit is contained in:
@@ -68,9 +68,9 @@ run bash -lc "cd '$ROOT/shorebird-server' && '$GO_BIN' test ./..."
|
||||
AOT_PATCH_BUILD_DIR="${AOT_PATCH_BUILD_DIR:-}"
|
||||
if [[ -z "$AOT_PATCH_BUILD_DIR" ]]; then
|
||||
for candidate in \
|
||||
"$ROOT/dart-sdk-new/xcodebuild/ReleaseARM64" \
|
||||
"$ROOT/dart-sdk-new/out/ReleaseARM64AotPatch" \
|
||||
"$ROOT/dart-sdk-new/out/ReleaseX64AotPatch"; do
|
||||
"$ROOT/dart-sdk/xcodebuild/ReleaseARM64" \
|
||||
"$ROOT/dart-sdk/out/ReleaseARM64AotPatch" \
|
||||
"$ROOT/dart-sdk/out/ReleaseX64AotPatch"; do
|
||||
if [[ -f "$candidate/args.gn" ]]; then
|
||||
AOT_PATCH_BUILD_DIR="$candidate"
|
||||
break
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
DART_SRC="${DART_SRC:-$ROOT/dart-sdk-new}"
|
||||
DART_SRC="${DART_SRC:-$ROOT/dart-sdk}"
|
||||
DART_TARGET="$ROOT/flutter/engine/src/flutter/third_party/dart"
|
||||
UPDATER_SRC="${UPDATER_SRC:-$ROOT/updater}"
|
||||
UPDATER_URL="${UPDATER_URL:-}"
|
||||
|
||||
@@ -562,9 +562,9 @@ assert!(
|
||||
"package metadata must point at the open workspace, not official Shorebird metadata: #{official_package_metadata_matches.join(', ')}"
|
||||
)
|
||||
expected_submodules = {
|
||||
'dart-sdk-new' => ['https://git.tonycloud.org/dart-lang/sdk.git', 'tonycloud/dev'],
|
||||
'dart-sdk' => ['https://github.com/tony-cloud/dart-sdk.git', 'tonycloud/dev'],
|
||||
'depot_tools' => ['https://chromium.googlesource.com/chromium/tools/depot_tools.git', 'main'],
|
||||
'flutter' => ['https://git.tonycloud.org/flutter/flutter.git', 'shorebird/dev'],
|
||||
'flutter' => ['https://github.com/tony-cloud/flutter.git', 'tonycloud/dev'],
|
||||
'shorebird' => ['https://git.tonycloud.org/flutter/shorebird.git', 'main'],
|
||||
'shorebird-server' => ['https://git.tonycloud.org/flutter/shorebird-server.git', 'main'],
|
||||
'updater' => ['https://git.tonycloud.org/flutter/shorebird-updater.git', 'main'],
|
||||
@@ -597,8 +597,8 @@ forbidden_gitmodule_fragments.each do |fragment|
|
||||
)
|
||||
end
|
||||
assert!(
|
||||
write_gclient.include?('"url": "https://git.tonycloud.org/dart-lang/sdk.git"') &&
|
||||
write_gclient.include?('"url": "https://git.tonycloud.org/flutter/flutter.git"') &&
|
||||
write_gclient.include?('"url": "https://github.com/tony-cloud/dart-sdk.git"') &&
|
||||
write_gclient.include?('"url": "https://github.com/tony-cloud/flutter.git"') &&
|
||||
!write_gclient.include?('github.com/shorebirdtech'),
|
||||
'gclient generation must use the open Dart/Flutter forks and avoid official Shorebird remotes'
|
||||
)
|
||||
@@ -645,8 +645,8 @@ assert!(
|
||||
'/openapi.yaml',
|
||||
],
|
||||
'docs/REPOSITORIES.md' => [
|
||||
'https://git.tonycloud.org/dart-lang/sdk.git',
|
||||
'https://git.tonycloud.org/flutter/flutter.git',
|
||||
'https://github.com/tony-cloud/dart-sdk.git',
|
||||
'https://github.com/tony-cloud/flutter.git',
|
||||
'https://git.tonycloud.org/flutter/shorebird.git',
|
||||
'https://git.tonycloud.org/flutter/shorebird-server.git',
|
||||
'https://git.tonycloud.org/flutter/shorebird-updater.git',
|
||||
@@ -681,7 +681,7 @@ assert!(
|
||||
'Asset changes are not part of a Dart code patch',
|
||||
],
|
||||
'shorebird/docs/getting-started/flutter-version/README.md' => [
|
||||
'https://git.tonycloud.org/flutter/flutter.git',
|
||||
'https://github.com/tony-cloud/flutter.git',
|
||||
'http://localhost:8080/artifacts',
|
||||
],
|
||||
}.each do |path, required_texts|
|
||||
@@ -700,7 +700,7 @@ end
|
||||
assert!(
|
||||
shorebird_flutter.include?('SHOREBIRD_FLUTTER_GIT_URL') &&
|
||||
shorebird_flutter.include?('defaultFlutterGitUrl') &&
|
||||
shorebird_flutter.include?('https://git.tonycloud.org/flutter/flutter.git'),
|
||||
shorebird_flutter.include?('https://github.com/tony-cloud/flutter.git'),
|
||||
'shorebird Flutter installer must default to the open fork and allow SHOREBIRD_FLUTTER_GIT_URL override'
|
||||
)
|
||||
assert!(
|
||||
@@ -790,7 +790,7 @@ assert!(
|
||||
}.each do |path, text|
|
||||
assert!(
|
||||
text.include?('SHOREBIRD_FLUTTER_GIT_URL') &&
|
||||
text.include?('https://git.tonycloud.org/flutter/flutter.git') &&
|
||||
text.include?('https://github.com/tony-cloud/flutter.git') &&
|
||||
text.include?('SHOREBIRD_FLUTTER_STORAGE_BASE_URL') &&
|
||||
text.include?('FLUTTER_STORAGE_BASE_URL') &&
|
||||
text.include?('http://localhost:8080/download.flutter.io') &&
|
||||
@@ -894,7 +894,7 @@ assert!(
|
||||
'Flutter Gradle plugin defaults must use the open local Flutter mirror'
|
||||
)
|
||||
assert!(
|
||||
flutter_deps.include?('"dart_sdk_git": "https://git.tonycloud.org/dart-lang/sdk.git"') &&
|
||||
flutter_deps.include?('"dart_sdk_git": "https://github.com/tony-cloud/dart-sdk.git"') &&
|
||||
flutter_deps.include?('"updater_git": "https://git.tonycloud.org/flutter/shorebird-updater.git"') &&
|
||||
!flutter_deps.include?('git@github.com:shorebirdtech/dart-sdk.git') &&
|
||||
!flutter_deps.include?('github.com/shorebirdtech/updater.git') &&
|
||||
@@ -1086,7 +1086,7 @@ assert!(
|
||||
assert!(
|
||||
verify_open_infrastructure_defaults.include?('BUILD_SENSITIVE_FILES') &&
|
||||
verify_open_infrastructure_defaults.include?('check_forbidden_in_tree "$ROOT/shorebird/packages/artifact_proxy/lib" dart') &&
|
||||
verify_open_infrastructure_defaults.include?('https://git.tonycloud.org/dart-lang/sdk.git') &&
|
||||
verify_open_infrastructure_defaults.include?('https://github.com/tony-cloud/dart-sdk.git') &&
|
||||
verify_open_infrastructure_defaults.include?('https://git.tonycloud.org/flutter/shorebird-updater.git') &&
|
||||
verify_open_infrastructure_defaults.include?('http://localhost:8080/download.flutter.io') &&
|
||||
verify_open_infrastructure_defaults.include?('http://localhost:8080/artifacts') &&
|
||||
@@ -1103,7 +1103,7 @@ assert!(
|
||||
verify_powershell_open_defaults.include?('shorebird/bin/shorebird.ps1') &&
|
||||
verify_powershell_open_defaults.include?('flutter/bin/internal/update_dart_sdk.ps1') &&
|
||||
verify_powershell_open_defaults.include?('System.Management.Automation.Language.Parser') &&
|
||||
verify_powershell_open_defaults.include?('https://git.tonycloud.org/flutter/flutter.git') &&
|
||||
verify_powershell_open_defaults.include?('https://github.com/tony-cloud/flutter.git') &&
|
||||
verify_powershell_open_defaults.include?('http://localhost:8080/download.flutter.io') &&
|
||||
verify_powershell_open_defaults.include?('download.shorebird.dev') &&
|
||||
verify_powershell_open_defaults.include?('github.com/shorebirdtech/flutter.git'),
|
||||
@@ -1732,7 +1732,7 @@ assert!(
|
||||
)
|
||||
%w[custom-dart-sdk custom-dart-sdk-macos].each do |job_name|
|
||||
assert!(
|
||||
run_text_by_job.fetch(job_name).include?('dart_sdk_revision="$(git -C dart-sdk-new rev-parse HEAD)"') &&
|
||||
run_text_by_job.fetch(job_name).include?('dart_sdk_revision="$(git -C dart-sdk rev-parse HEAD)"') &&
|
||||
run_text_by_job.fetch(job_name).include?('"dart_sdk_git_sha": "${dart_sdk_revision}"'),
|
||||
"#{job_name} manifest must record the Dart SDK source revision"
|
||||
)
|
||||
@@ -1890,11 +1890,11 @@ end
|
||||
)
|
||||
end
|
||||
assert!(
|
||||
run_text_by_job.fetch('custom-dart-sdk').include?('verify_dart_sdk_args.sh dart-sdk-new/out/ReleaseX64/args.gn'),
|
||||
run_text_by_job.fetch('custom-dart-sdk').include?('verify_dart_sdk_args.sh dart-sdk/out/ReleaseX64/args.gn'),
|
||||
'Linux Dart SDK job must verify patched SDK args'
|
||||
)
|
||||
assert!(
|
||||
run_text_by_job.fetch('custom-dart-sdk-macos').include?('verify_dart_sdk_args.sh dart-sdk-new/xcodebuild/ReleaseARM64/args.gn'),
|
||||
run_text_by_job.fetch('custom-dart-sdk-macos').include?('verify_dart_sdk_args.sh dart-sdk/xcodebuild/ReleaseARM64/args.gn'),
|
||||
'macOS Dart SDK job must verify patched SDK args'
|
||||
)
|
||||
%w[custom-dart-sdk custom-dart-sdk-macos].each do |job_name|
|
||||
|
||||
@@ -89,13 +89,13 @@ check_forbidden_in_tree "$ROOT/shorebird/packages/artifact_proxy/lib" dart
|
||||
check_forbidden_in_tree "$ROOT/shorebird/packages/shorebird_cli/lib" dart
|
||||
check_forbidden_in_tree "$ROOT/shorebird/packages/shorebird_code_push_client/lib" dart
|
||||
|
||||
require_contains "$ROOT/.gitmodules" "https://git.tonycloud.org/dart-lang/sdk.git"
|
||||
require_contains "$ROOT/.gitmodules" "https://git.tonycloud.org/flutter/flutter.git"
|
||||
require_contains "$ROOT/.gitmodules" "https://github.com/tony-cloud/dart-sdk.git"
|
||||
require_contains "$ROOT/.gitmodules" "https://github.com/tony-cloud/flutter.git"
|
||||
require_contains "$ROOT/.gitmodules" "https://git.tonycloud.org/flutter/shorebird.git"
|
||||
require_contains "$ROOT/.gitmodules" "https://git.tonycloud.org/flutter/shorebird-server.git"
|
||||
require_contains "$ROOT/.gitmodules" "https://git.tonycloud.org/flutter/shorebird-updater.git"
|
||||
|
||||
require_contains "$ROOT/flutter/DEPS" '"dart_sdk_git": "https://git.tonycloud.org/dart-lang/sdk.git"'
|
||||
require_contains "$ROOT/flutter/DEPS" '"dart_sdk_git": "https://github.com/tony-cloud/dart-sdk.git"'
|
||||
require_contains "$ROOT/flutter/DEPS" '"updater_git": "https://git.tonycloud.org/flutter/shorebird-updater.git"'
|
||||
|
||||
require_contains "$ROOT/flutter/packages/flutter_tools/lib/src/cache.dart" \
|
||||
|
||||
@@ -29,7 +29,7 @@ flutter_dart_updater="$ROOT/flutter/bin/internal/update_dart_sdk.ps1"
|
||||
[[ -f "$flutter_dart_updater" ]] || fail "missing Flutter Dart SDK updater: $flutter_dart_updater"
|
||||
|
||||
require_contains "$shorebird_launcher" \
|
||||
'$defaultFlutterGitUrl = "https://git.tonycloud.org/flutter/flutter.git"'
|
||||
'$defaultFlutterGitUrl = "https://github.com/tony-cloud/flutter.git"'
|
||||
require_contains "$shorebird_launcher" \
|
||||
'$defaultFlutterStorageBaseUrl = "http://localhost:8080/download.flutter.io"'
|
||||
require_contains "$shorebird_launcher" 'SHOREBIRD_FLUTTER_GIT_URL'
|
||||
|
||||
@@ -22,9 +22,9 @@ make_workspace() {
|
||||
cp "$ROOT/scripts/sync_open_sources.sh" "$workspace/scripts/sync_open_sources.sh"
|
||||
chmod +x "$workspace/scripts/sync_open_sources.sh"
|
||||
|
||||
init_git_checkout "$workspace/dart-sdk-new"
|
||||
mkdir -p "$workspace/dart-sdk-new/runtime/vm"
|
||||
: > "$workspace/dart-sdk-new/runtime/vm/dart_api_impl.h"
|
||||
init_git_checkout "$workspace/dart-sdk"
|
||||
mkdir -p "$workspace/dart-sdk/runtime/vm"
|
||||
: > "$workspace/dart-sdk/runtime/vm/dart_api_impl.h"
|
||||
|
||||
init_git_checkout "$workspace/updater"
|
||||
mkdir -p "$workspace/updater/library/include"
|
||||
@@ -35,7 +35,7 @@ make_workspace() {
|
||||
|
||||
run_sync() {
|
||||
local workspace="$1"
|
||||
DART_SRC="$workspace/dart-sdk-new" \
|
||||
DART_SRC="$workspace/dart-sdk" \
|
||||
UPDATER_SRC="$workspace/updater" \
|
||||
"$workspace/scripts/sync_open_sources.sh"
|
||||
}
|
||||
@@ -47,7 +47,7 @@ assert_links_to_workspace_sources() {
|
||||
|
||||
test -L "$dart_target"
|
||||
test -L "$updater_target"
|
||||
[[ "$(real_path "$dart_target")" == "$(real_path "$workspace/dart-sdk-new")" ]]
|
||||
[[ "$(real_path "$dart_target")" == "$(real_path "$workspace/dart-sdk")" ]]
|
||||
[[ "$(real_path "$updater_target")" == "$(real_path "$workspace/updater")" ]]
|
||||
test -f "$dart_target/runtime/vm/dart_api_impl.h"
|
||||
test -f "$updater_target/library/include/updater_engine.h"
|
||||
@@ -88,7 +88,7 @@ test -f "$dirty_dart/untracked.txt"
|
||||
|
||||
forbidden_dart_remote_workspace="$TMP_DIR/forbidden-dart-remote"
|
||||
make_workspace "$forbidden_dart_remote_workspace"
|
||||
git -C "$forbidden_dart_remote_workspace/dart-sdk-new" remote add origin \
|
||||
git -C "$forbidden_dart_remote_workspace/dart-sdk" remote add origin \
|
||||
https://github.com/dart-lang/sdk.git
|
||||
if run_sync "$forbidden_dart_remote_workspace" >"$TMP_DIR/forbidden-dart-remote.log" 2>&1; then
|
||||
echo "expected forbidden Dart SDK remote to fail" >&2
|
||||
@@ -111,7 +111,7 @@ grep -q "updater submodule source checkout uses forbidden remote fragment" \
|
||||
forbidden_updater_url_workspace="$TMP_DIR/forbidden-updater-url"
|
||||
make_workspace "$forbidden_updater_url_workspace"
|
||||
rm -rf "$forbidden_updater_url_workspace/updater"
|
||||
if DART_SRC="$forbidden_updater_url_workspace/dart-sdk-new" \
|
||||
if DART_SRC="$forbidden_updater_url_workspace/dart-sdk" \
|
||||
UPDATER_SRC="$forbidden_updater_url_workspace/missing-updater" \
|
||||
UPDATER_URL=https://github.com/shorebirdtech/updater.git \
|
||||
"$forbidden_updater_url_workspace/scripts/sync_open_sources.sh" \
|
||||
|
||||
@@ -33,13 +33,13 @@ esac
|
||||
cat > "$ROOT/.gclient" <<EOF
|
||||
solutions = [
|
||||
{
|
||||
"name": "dart-sdk-new",
|
||||
"url": "https://git.tonycloud.org/dart-lang/sdk.git",
|
||||
"name": "dart-sdk",
|
||||
"url": "https://github.com/tony-cloud/dart-sdk.git",
|
||||
"deps_file": "DEPS",
|
||||
"managed": False,
|
||||
"custom_deps": {},
|
||||
"custom_vars": {
|
||||
"dart_root": "dart-sdk-new",
|
||||
"dart_root": "dart-sdk",
|
||||
"download_android_deps": $DART_DOWNLOAD_ANDROID_DEPS,
|
||||
"checkout_javascript_engines": False,
|
||||
"checkout_benchmarks_internal": False,
|
||||
@@ -57,7 +57,7 @@ if [[ "$INCLUDE_ENGINE_DEPS" == "1" ]]; then
|
||||
solutions = [
|
||||
{
|
||||
"name": ".",
|
||||
"url": "https://git.tonycloud.org/flutter/flutter.git",
|
||||
"url": "https://github.com/tony-cloud/flutter.git",
|
||||
"deps_file": "DEPS",
|
||||
"managed": False,
|
||||
"custom_deps": {
|
||||
|
||||
Reference in New Issue
Block a user