Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion ng-dev/release/snapshot-publish/snapshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,17 @@ export class SnapshotPublisher {
this.git.run(['add', '-A'], {cwd: tmpRepoDir});
const containsChanges =
this.git.runGraceful(
['diff-index', '--quiet', '-I', '0\\.0\\.0-[a-f0-9]+', 'HEAD', '--'],
[
'diff-index',
'--quiet',
'-I',
'0\\.0\\.0-[a-f0-9]+',
'HEAD',
'--',
'.',
':(exclude)**/MODULE.bazel.lock',
':(exclude)**/package-lock.json',
],
Comment on lines +161 to +171
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While this change correctly ignores the specified lock files, hardcoding them here makes it less flexible. If we need to ignore other files in the future, we'll have to modify this code again.

Consider making the list of ignored files configurable in the release configuration (e.g., in .ng-dev/config.js). This would make the snapshot publishing logic more maintainable and adaptable.

For example, you could add a snapshotIgnoredFiles property to the release config and then build the diff-index arguments dynamically from that list.

{cwd: tmpRepoDir},
).status === 1;

Expand Down
Loading