blob: 0668a8e51ee7639862b4b1c20721b23c2b8aabc0 [file] [log] [blame]
# Copyright 2024 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
load(":info.bzl", "gen_latest_date_and_timestamp", "get_build_info_version", "get_latest_commit_date", "get_latest_commit_hash", "get_timestamp_file")
package(default_visibility = ["//visibility:public"])
# A single _private_ target that generates 3 output files.
# These are then made available independently through three
# public targets defined below.
gen_latest_date_and_timestamp(
name = "latest_date_and_timestamp",
# This cannot run properly in a sandbox as it will access
# //:integration/.git/ content in unpredictable ways and
# there is no way to compute which exact set of inputs in
# advance. The alternative is to expose all of the directory,
# which creates a ton of symlinks in the sandbox, which is
# slow and has no practical benefit.
tags = ["local"],
# This package is private.
visibility = [":__pkg__"],
)
get_timestamp_file(
name = "minimum_utc_stamp",
from_target = ":latest_date_and_timestamp",
)
get_latest_commit_hash(
name = "latest_commit_hash",
from_target = ":latest_date_and_timestamp",
)
get_latest_commit_date(
name = "latest_commit_date",
from_target = ":latest_date_and_timestamp",
)
alias(
name = "jiri_snapshot",
# An actual symlink generated by update-workspace.py as it normally
# does not expose the content of .jiri_root/ to the workspace.
actual = "//:fuchsia_build_generated/jiri_snapshot.xml",
)
get_build_info_version(
name = "version",
)