Skip to content

Commit e1c1427

Browse files
committed
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.
1 parent b9ac8bc commit e1c1427

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ng-dev/release/snapshot-publish/snapshots.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,11 @@ export class SnapshotPublisher {
161161
['diff-index', '--quiet', '-I', '0\\.0\\.0-[a-f0-9]+', 'HEAD', '--'],
162162
{cwd: tmpRepoDir},
163163
).status === 1;
164+
164165
this.git.run(
165166
[
166167
'commit',
168+
'--allow-empty',
167169
'--author',
168170
this.commitAuthor,
169171
'-m',

0 commit comments

Comments
 (0)