fix(ng-dev/release): allow empty commits when publishing snapshots#3534
Conversation
There was a problem hiding this comment.
Code Review
This pull request correctly addresses an issue where git commit would fail during snapshot publishing if no changes were detected. By adding a check for changes before attempting to commit, the change prevents potential errors. My review includes a suggestion to improve how the commit message is passed to Git, ensuring it's formatted correctly without unnecessary quotes.
josephperrott
left a comment
There was a problem hiding this comment.
Rather than selecting running the git commit command we should --allow-empty for cases where we do want it to publish regardless of whether its changed.
For instance in angular/angular, we always want it to publish since we want to have a snapshot of all of the packages, not just the changed ones for a given commit.
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.
800126f to
e1c1427
Compare
|
This PR was merged into the repository. The changes were merged into the following branches:
|
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 adding the --allow-empty flag to
ensure the commit succeeds regardless of changes.