mirror of https://github.com/bazelbuild/platforms
Add instructions for mirroring and updating Bazel to the release script.
This commit is contained in:
parent
da5541f26b
commit
34e7b8a3a5
|
@ -22,6 +22,8 @@ dist_file="/tmp/platforms-${version}.tar.gz"
|
|||
tar czf "$dist_file" BUILD LICENSE WORKSPACE cpu os
|
||||
sha256=$(shasum -a256 "$dist_file" | cut -d' ' -f1)
|
||||
|
||||
path="github.com/bazelbuild/platforms/releases/download/$version/platforms-$version.tar.gz"
|
||||
|
||||
cat <<INP
|
||||
|
||||
|
||||
|
@ -30,7 +32,7 @@ cat <<INP
|
|||
3. Upload $dist_file as an artifact.
|
||||
4. Copy $dist_file to the mirror site.
|
||||
5. Create the release.
|
||||
6. Update Bazel to point to this new release. See the readme.
|
||||
6. Update Bazel distdir_deps.bzl to point to this new release. See the readme.
|
||||
|
||||
=============== CUT HERE ===============
|
||||
**WORKSPACE setup**
|
||||
|
@ -40,12 +42,28 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|||
http_archive(
|
||||
name = "platforms",
|
||||
urls = [
|
||||
"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",
|
||||
"https://mirror.bazel.build/${path}",
|
||||
"https://${path}",
|
||||
],
|
||||
sha256 = "$sha256",
|
||||
)
|
||||
\`\`\`
|
||||
=============== CUT HERE ===============
|
||||
INP
|
||||
|
||||
|
||||
Use this to update Bazel's distdir_deps.bzl
|
||||
|
||||
|
||||
"archive": "platforms-$version.tar.gz",
|
||||
"sha256": "$sha256",
|
||||
"urls": [
|
||||
"https://mirror.bazel.build/${path}",
|
||||
"https://${path}",
|
||||
],
|
||||
|
||||
Copy/paste this to mirror the file.
|
||||
|
||||
gsutil cp /tmp/platforms-$version.tar.gz gs://bazel-mirror/${path}"
|
||||
gsutil setmeta -h "Cache-Control: public, max-age=31536000" "gs://bazel-mirror/${path}"
|
||||
|
||||
INP
|
||||
|
|
Loading…
Reference in New Issue