| if [[ ! -f WORKSPACE ]] ; then |
| echo 'You must run this command from the top of the workspace.' |
| # tar on macos builds a file with different checksums each time. |
| if [[ $(uname) != 'Linux' ]] ; then |
| echo 'You must run this command from a linux machine.' |
| dist_file="/tmp/platforms-${version}.tar.gz" |
| tar czf "$dist_file" BUILD LICENSE WORKSPACE cpu os |
| sha256=$(shasum -a256 "$dist_file" | cut -d' ' -f1) |
| 1. Create a new release using the tag $version |
| 2. Copy/paste the text below into the release description field. |
| 3. Upload $dist_file as an artifact. |
| 4. Copy $dist_file to the mirror site. |
| 6. Update Bazel to point to this new release. See the readme. |
| =============== CUT HERE =============== |
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/$version/platforms-$version.tar.gz", |
| "https://github.com/bazelbuild/platforms/releases/download/$version/platforms-$version.tar.gz", |
| =============== CUT HERE =============== |