You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore(dcg): automate DCG_VERSION + checksum updates via Renovate #1067
src/services/destructive-command-guard/constants.ts hardcodes DCG_VERSION and four platform-specific SHA-256 checksums in DCG_ARCHIVES. These must be kept in sync by hand whenever Destructive Command Guard releases a new version. Added in PR #1060.
Problem
Manual bumps are error-prone: a contributor could update DCG_VERSION without updating one or more checksum entries. ensureManagedBinaryInstalled verifies the archive checksum before use (see src/services/managed-binary/install.ts), so a stale or mismatched hash breaks DCG installation for the affected platform. This is the same class of issue as #481 for Semble.
Proposed solution
Add a helper script (scripts/update-dcg-checksums.sh) that:
Reads DCG_VERSION from src/services/destructive-command-guard/constants.ts
Downloads all four platform archives from the GitHub release (Dicklesworthstone/destructive_command_guard)
Computes shasum -a 256 for each
Patches the sha256 fields in DCG_ARCHIVES in-place
Wire up a Renovate custom regex manager to detect DCG_VERSION bumps:
Add a postUpgradeTasks entry to run scripts/update-dcg-checksums.sh after each version bump so checksums are recomputed and committed atomically with the version change.
Activity