Skip to content

Commit 5339bcc

Browse files
committed
fix(ng-dev/release): ignore lock files when detecting snapshot changes
Update the `diff-index` command used during snapshot publishing to ignore `MODULE.bazel.lock` and `package-lock.json` files. This prevents triggering snapshot publishes when the only changes are in dependency lock files.
1 parent 8e3a461 commit 5339bcc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,17 @@ export class SnapshotPublisher {
158158
this.git.run(['add', '-A'], {cwd: tmpRepoDir});
159159
const containsChanges =
160160
this.git.runGraceful(
161-
['diff-index', '--quiet', '-I', '0\\.0\\.0-[a-f0-9]+', 'HEAD', '--'],
161+
[
162+
'diff-index',
163+
'--quiet',
164+
'-I',
165+
'0\\.0\\.0-[a-f0-9]+',
166+
'HEAD',
167+
'--',
168+
'.',
169+
':(exclude)**/MODULE.bazel.lock',
170+
':(exclude)**/package-lock.json',
171+
],
162172
{cwd: tmpRepoDir},
163173
).status === 1;
164174

0 commit comments

Comments
 (0)