Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Latest commit

 

History

History
60 lines (39 loc) · 2.45 KB

lockfile.md

File metadata and controls

60 lines (39 loc) · 2.45 KB

To load these rules, add this to the top of your BUILD file:

load("@rules_debian_packages//debian_packages:defs.bzl", ...)

debian_packages_lockfile

debian_packages_lockfile(name, snapshots_file, packages_file, lock_file, mirror, verbose, debug)

Macro that produces targets to interact with a lockfile.

Produces a target [name].generate, which generates a lockfile containing packages defined in [packages_file] resolved against [snapshots_file].

Produces a target [name].update, which updates the snapshots and generates the lockfile.

Typical usage in BUILD.bazel:

load("@rules_debian_packages//debian_packages:defs.bzl", "debian_packages_lockfile")

# Generate lockfile with:
# bazel run //path/to:debian_packages.generate
# Update snapshots with:
# bazel run //path/to:debian_packages.update
debian_packages_lockfile(
    name = "debian_packages",
    lock_file = "debian_packages.lock",
    packages_file = "debian_packages.yaml",
    snapshots_file = "debian_snapshots.yaml",
)

PARAMETERS

Name Description Default Value
name The name of the lockfile-target. none
snapshots_file The file to read or write the debian snapshots from. "snapshots.yaml"
packages_file The file to read the desired packages from. "packages.yaml"
lock_file The file to write locked packages to. "packages.lock"
mirror The debian-snapshot host to use. "https://snapshot.debian.org"
verbose Enable verbose logging. False
debug Enable debug logging. False