diff --git a/src/WORKSPACE.bazel b/src/WORKSPACE.bazel index eae4bb4cc..d5138907f 100644 --- a/src/WORKSPACE.bazel +++ b/src/WORKSPACE.bazel @@ -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") @@ -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", ) diff --git a/src/config.bzl b/src/config.bzl index db619712e..11bb88ea8 100644 --- a/src/config.bzl +++ b/src/config.bzl @@ -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