Skip to content

Commit

Permalink
Commit to the main branch of bazelrules/rules_sass (#1497)
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Sep 21, 2021
1 parent 825fa5c commit a881eb6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
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

0 comments on commit a881eb6

Please sign in to comment.