From e1c1427ee83d7f1cf763cf1473c4e425a02d75d9 Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Fri, 13 Mar 2026 13:39:22 +0000 Subject: [PATCH] fix(ng-dev/release): allow empty commits when publishing snapshots When publishing snapshots, it's possible that a package is built but contains no functional changes (e.g. only version placeholder updates which are ignored by the diff). Previously, the git commit step would fail in these cases because the working tree was clean. This change adds the --allow-empty flag to ensure the commit succeeds regardless of changes. --- ng-dev/release/snapshot-publish/snapshots.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ng-dev/release/snapshot-publish/snapshots.ts b/ng-dev/release/snapshot-publish/snapshots.ts index 6c4aef7d8..2cbb7ae13 100644 --- a/ng-dev/release/snapshot-publish/snapshots.ts +++ b/ng-dev/release/snapshot-publish/snapshots.ts @@ -161,9 +161,11 @@ export class SnapshotPublisher { ['diff-index', '--quiet', '-I', '0\\.0\\.0-[a-f0-9]+', 'HEAD', '--'], {cwd: tmpRepoDir}, ).status === 1; + this.git.run( [ 'commit', + '--allow-empty', '--author', this.commitAuthor, '-m',