-
Notifications
You must be signed in to change notification settings - Fork 0
add changelog script #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bin/changelog
Outdated
|
||
const changelog = fs.readFileSync('CHANGELOG.md', 'utf8') | ||
.replace(/\n{3,}/g, '\n'); | ||
const rows = changelog.split('\n'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
мне кажется replace лучше тут сделать, чтобы оригинал был оригиналом
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
наверное да, хоть он потом и не используется нигде
const rest = []; | ||
const links = []; | ||
|
||
_(rows).each((row) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c isHeader тут думаю можно не парится
|
||
fs.writeFileSync('CHANGELOG.md', newChangelog); | ||
|
||
exec('git add -A CHANGELOG.md'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
может в утилиту вынести commitFile, потому что дублируется с lib/version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
да это отдельно надо как-то продумать
забыл еще написать что использовать это можно, добавив в package.json в scripts |
No description provided.