Documentation
¶
Overview ¶
Package updater contains the type Updater to update Bazel workspace and module snippets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
Updater updates Bazel workspace and module snippets. The zero Updater is not valid; use New to create Updater objects.
func New ¶
New creates a new Updater. dir must be a directory within a checked-out Git repository. The repository must have exactly one remote whose URL starts with urlPrefix (normally https://github.com/). The remote must support GitHub’s archive functionality.
func (*Updater) Update ¶
Update updates commit and archive hashes within the given file. The file must contain at least one stanza of the form
git_override( module_name = "…", remote = "…", commit = "〈hash〉", )
or
http_archive( name = "…", urls = ["https://github.com/owner/repo/archive/〈hash〉.zip"], sha256 = "…", integrity = "…", strip_prefix = "repo-〈hash〉", )
Update replaces the hashes with the values from the upstream HEAD commit.