Skip to content

Commit

Permalink
chore(docs): update WORKSPACE setup for skylib (bazelbuild#926)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenrui333 authored and Andre Rocha committed Jul 6, 2020
1 parent 501e769 commit 49ee1bb
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 49ee1bb

Please sign in to comment.