Skip to content

Commit

Permalink
Add SHA256 values of zip code files in config.bzl
Browse files Browse the repository at this point in the history
These SHA256 values are also directories in repository_cache.
When zip code files are prefetched and used via --repository_cache for offline build, SHA256 values should be specified.

PiperOrigin-RevId: 636775792
  • Loading branch information
hiroyuki-komatsu committed May 24, 2024
1 parent 89161fb commit 4587e50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ load(
"http_archive",
"http_file",
)
load("@//:config.bzl", "MACOS_QT_PATH")
load("@//:config.bzl", "MACOS_QT_PATH", "SHA256_ZIP_CODE_KEN_ALL", "SHA256_ZIP_CODE_JIGYOSYO")
load("@//bazel:pkg_config_repository.bzl", "pkg_config_repository")


Expand Down Expand Up @@ -264,11 +264,13 @@ http_file(
http_archive(
name = "zip_code_ken_all",
build_file_content = "exports_files([\"KEN_ALL.CSV\"])",
sha256 = SHA256_ZIP_CODE_KEN_ALL,
url = "https://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip",
)

http_archive(
name = "zip_code_jigyosyo",
build_file_content = "exports_files([\"JIGYOSYO.CSV\"])",
sha256 = SHA256_ZIP_CODE_JIGYOSYO,
url = "https://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip",
)
6 changes: 6 additions & 0 deletions src/config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,9 @@ MACOS_MIN_OS_VER = "11.0"
#
# For Linux, Qt paths are managed by pkg_config_repository in WORKSPACE.bazel.
MACOS_QT_PATH = "/usr/local/Qt-6.5.2"

## SHA256 of zip code files.
# When zip code files are prefetched and used via --repository_cache for offline build,
# SHA256 values should be specified.
SHA256_ZIP_CODE_KEN_ALL = None
SHA256_ZIP_CODE_JIGYOSYO = None

0 comments on commit 4587e50

Please sign in to comment.