conventional-changelog-action icon indicating copy to clipboard operation
conventional-changelog-action copied to clipboard

[Question] remove newline in end of the version file by default?

Open tyn1998 opened this issue 2 years ago • 2 comments

Hi, @TriPSs, thanks for providing such a great action!

I have a question here: if it is true that CCA will remove newline in end of the version file by default? Please see https://github.com/opensumi/devtools/pull/4#discussion_r959542074.

My workflow is: https://github.com/opensumi/devtools/blob/d2984fc78f574bef7ad06188c1ef3ff9eee49efd/.github/workflows/release.yml#L20-L26

tyn1998 avatar Aug 31 '22 13:08 tyn1998

Hmm that is a good one, I indeed think that JSON.stringify does not add an empty line.

Maybe we can make it opt in/out.

TriPSs avatar Aug 31 '22 13:08 TriPSs

That will be so nice!

In another case I use a pre-commit file to bump version manually, where the end of line is not affected because of this.

tyn1998 avatar Aug 31 '22 13:08 tyn1998

I agree with this issue. Removing the newline is breaking my CI.

package.json shouldn't be modified at all outside of the version bump.

ghost avatar Oct 04 '22 13:10 ghost

Think we can also make it auto detect by checking if the last line of the file is empty.

TriPSs avatar Oct 04 '22 13:10 TriPSs

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 24 '22 03:12 stale[bot]