From a71504d98fc6fc18027773a14847efe2eaf2357b Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Thu, 16 Jan 2020 10:30:13 -0500 Subject: [PATCH] chore(docs): update WORKSPACE setup for skylib --- README.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9a22f1dfa..8e0a0f0d4 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,19 @@ This project defines core build rules for [Scala](https://www.scala-lang.org/) t 2. Add the following to your `WORKSPACE` file and update the `githash` if needed: ```python +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +# bazel-skylib 0.8.0 released 2019.03.20 (https://github.com/bazelbuild/bazel-skylib/releases/tag/0.8.0) +skylib_version = "0.8.0" +http_archive( + name = "bazel_skylib", + type = "tar.gz", + url = "https://github.com/bazelbuild/bazel-skylib/releases/download/{}/bazel-skylib.{}.tar.gz".format (skylib_version, skylib_version), + sha256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e", +) + rules_scala_version="69d3c5b5d9b51537231746e93b4383384c9ebcf4" # update this as needed -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_scala", strip_prefix = "rules_scala-%s" % rules_scala_version, @@ -54,15 +64,6 @@ http_archive( strip_prefix = "protobuf-%s" % protobuf_version, sha256 = protobuf_version_sha256, ) - -# bazel-skylib 0.8.0 released 2019.03.20 (https://github.com/bazelbuild/bazel-skylib/releases/tag/0.8.0) -skylib_version = "0.8.0" -http_archive( - name = "bazel_skylib", - type = "tar.gz", - url = "https://github.com/bazelbuild/bazel-skylib/releases/download/{}/bazel-skylib.{}.tar.gz".format (skylib_version, skylib_version), - sha256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e", -) ``` This will load the `rules_scala` repository at the commit sha