Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit to the main branch of bazelrules/rules_sass #1497

Merged
merged 1 commit into from Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions tool/grind/bazel.dart
Expand Up @@ -16,7 +16,8 @@ Future<void> updateBazel() async {

run("npm", arguments: ["install", "-g", "yarn"]);

var repo = await cloneOrPull("https://github.com/bazelbuild/rules_sass.git");
var repo = await cloneOrCheckout(
"https://github.com/bazelbuild/rules_sass.git", "origin/main");

var packageFile = File(p.join(repo, "sass", "package.json"));
log("updating ${packageFile.path}");
Expand Down Expand Up @@ -62,7 +63,7 @@ Future<void> updateBazel() async {
arguments: [
"push",
"https://$username:$password@github.com/bazelbuild/rules_sass.git",
"HEAD:master"
"HEAD:main"
],
workingDirectory: repo);
}
6 changes: 4 additions & 2 deletions tool/grind/benchmark.dart
Expand Up @@ -95,8 +95,10 @@ Future<void> _writeNTimes(String path, String text, num times,
@Depends(benchmarkGenerate, "pkg-compile-snapshot", "pkg-compile-native",
"pkg-npm-release")
Future<void> benchmark() async {
var libsass = await cloneOrPull('https://github.com/sass/libsass');
var sassc = await cloneOrPull('https://github.com/sass/sassc');
var libsass =
await cloneOrCheckout('https://github.com/sass/libsass', 'origin/master');
var sassc =
await cloneOrCheckout('https://github.com/sass/sassc', 'origin/master');

await runAsync("make",
runOptions: RunOptions(
Expand Down
7 changes: 0 additions & 7 deletions tool/grind/utils.dart
Expand Up @@ -42,13 +42,6 @@ String environment(String name) {
return value;
}

/// Ensure that the repository at [url] is cloned into the build directory and
/// pointing to the latest master revision.
///
/// Returns the path to the repository.
Future<String> cloneOrPull(String url) async =>
cloneOrCheckout(url, "origin/master");

/// Ensure that the repository at [url] is cloned into the build directory and
/// pointing to [ref].
///
Expand Down