Skip to content

Commit

Permalink
Remove usage of gsutil (#2875)
Browse files Browse the repository at this point in the history
* Remove the usage of gsutil

The tool brings in dependencies which we don't want, so just use the URI
directly to get the file.

* verbosity pass through
  • Loading branch information
mattleibow authored May 30, 2024
1 parent b6e477b commit 9ff2052
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
18 changes: 7 additions & 11 deletions native/winui/ANGLE.cake
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,13 @@ void InitializeAngle(string branch, DirectoryPath ANGLE_PATH, DirectoryPath WINA
RunPython(ANGLE_PATH, ANGLE_PATH.CombineWithFilePath("build/util/lastchange.py"), $"-o {lastchange}");
}

if (!FileExists(ANGLE_PATH.CombineWithFilePath("build/toolchain/win/rc/win/rc.exe"))) {
var oldPath = EnvironmentVariable("PATH");
try {
System.Environment.SetEnvironmentVariable("PATH", DEPOT_PATH.FullPath + System.IO.Path.PathSeparator + oldPath);

RunPython(ANGLE_PATH,
DEPOT_PATH.CombineWithFilePath("download_from_google_storage.py"),
$"--no_resume --no_auth --bucket chromium-browser-clang/rc -s build/toolchain/win/rc/win/rc.exe.sha1");
} finally {
System.Environment.SetEnvironmentVariable("PATH", oldPath);
}
var rc_exe = "build/toolchain/win/rc/win/rc.exe";
var rcPath = ANGLE_PATH.CombineWithFilePath(rc_exe);
if (!FileExists(rcPath)) {
var shaPath = ANGLE_PATH.CombineWithFilePath($"{rc_exe}.sha1");
var sha = System.IO.File.ReadAllText(shaPath.FullPath);
var url = $"https://storage.googleapis.com/download/storage/v1/b/chromium-browser-clang/o/rc%2F{sha}?alt=media";
DownloadFile(url, rcPath);
}

if (!FileExists(ANGLE_PATH.CombineWithFilePath("third_party/llvm-build/Release+Asserts/cr_build_revision"))) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/cake/shared.cake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
using System.Text.RegularExpressions;

var TARGET = Argument("t", Argument("target", "Default"));
var VERBOSITY = Argument("v", Argument("verbosity", Verbosity.Normal));
var VERBOSITY = Context.Log.Verbosity;
var CONFIGURATION = Argument("c", Argument("configuration", "Release"));

var VS_INSTALL = Argument("vsinstall", EnvironmentVariable("VS_INSTALL"));
Expand All @@ -28,6 +28,7 @@ void RunCake(FilePath cake, string target = null, Dictionary<string, string> arg
var args = Arguments().ToDictionary(a => a.Key, a => a.Value.LastOrDefault());

args["target"] = target;
args["verbosity"] = VERBOSITY.ToString();

if (arguments != null) {
foreach (var arg in arguments) {
Expand Down

0 comments on commit 9ff2052

Please sign in to comment.