Lerna Changelog 자동화
Last updated
Last updated
아래 글에서 lerna를 이용한 monorepo 구축하는 방법에 대해 이전에 소개한 바있다.
오픈소스를 보았을 때 CHANGLOG.md라는 파일이 있는데 직접 일일히 처리하기보다는 commit msg를 이용하여 CHANGELOG를 처리하는 방법을 택하는 것이 좋을 것 같았다.
lerna version이라는 CLI 명령어가 있지만 commitlint에 따르는 옵션을 추가함으로서 CHANGELOG를 정리하는 방법에 대해 정리하고자 한다.
commitlint를 적용하기 위해 library를 설치하고 config파일을 생성한다.
-D 옵션은 devDependencies 패키지 옵션입니다.
-W옵션은 monorepo root에 설치할 패키지 옵션입니다.
lerna version
명령어를 실행하면 변경된 package파일의 changelog가 push까지 이루어진다.
위의 lerna.json파일을 적용 후 CHANGELOG.md
react: Configure common validators (git ref)
Rename template (git ref)
Configure git hook (git ref)
All notable changes to this project will be documented in this file. See for commit guidelines.