The release tarball at https://github.com/rmohr/bazeldnf/releases/download/<version>/bazeldnf-<version>.tar.gz differs from the raw tag file at https://raw.githubusercontent.com/rmohr/bazeldnf/<version>/MODULE.bazel.
Always download and inspect the actual tarball before writing the patch:
curl -sL <tarball-url> | tar xzO bazeldnf-<version>/MODULE.bazel | cat -n
The tarball's MODULE.bazel:
"bazelndf dependencies" as line 1 (a string literal — not a comment)version = "v0.99.2-rc1")The patch removes non-dev Go build tool dependencies that are not needed by consumers:
bazel_dep(name = "gazelle", ...)bazel_dep(name = "rules_go", ...)go_sdk extension blockgo_deps extension block and use_repoDev dependencies marked with dev_dependency = True (e.g. bazeldnf_dev, protobuf, build tools) do NOT need to be patched out — Bazel ignores them for consumers.
Use git-style a/b headers with patch_strip=1 in source.json:
--- a/MODULE.bazel +++ b/MODULE.bazel
Not the MODULE.bazel.orig / MODULE.bazel format (patch_strip=0) used in rc0 — that format requires MODULE.bazel.orig to exist in the tarball, which it doesn't.
The modules/bazeldnf/v0.99.2-rc0/MODULE.bazel.orig file should not be in the repo. Do not carry it over when creating new versions.
mkdir -p modules/bazeldnf/<version> and copy from previous version
Delete MODULE.bazel.orig if copied
Download and inspect the actual tarball's MODULE.bazel
Update MODULE.bazel to match the tarball's kept content (with Go deps removed)
Update patches/MODULE.bazel.patch as a diff from tarball → BCR MODULE.bazel
Update source.json: new URL, docs_url, strip_prefix, patch_strip: 1, placeholder integrity hashes
docs_url format: https://github.com/rmohr/bazeldnf/releases/download/<version>/bazeldnf-<version>.docs.tar.gzAdd new version to metadata.json
Run bazel run //tools:update_integrity -- bazeldnf --version=<version>
Run bazel run //tools:bcr_validation -- --check bazeldnf@<version>
Commit with message format:
bazeldnf@<version> Release: https://github.com/rmohr/bazeldnf/releases/tag/<version> This commit was made with the help of Claude (claude.ai)
Note: do NOT use Co-Authored-By: Claude ... — Anthropic would need to sign Google's CLA.