feat: refs #6428 auto-changelog with bash #2338
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
|
@ -54,6 +54,12 @@ For end-to-end tests run from project's root.
|
||||||
$ npm run test:e2e
|
$ npm run test:e2e
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Generate changeLog test → master
|
||||||
|
```
|
||||||
|
$ bash changelog.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Visual Studio Code extensions
|
## Visual Studio Code extensions
|
||||||
|
|
||||||
Open Visual Studio Code, press Ctrl+P and paste the following commands.
|
Open Visual Studio Code, press Ctrl+P and paste the following commands.
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
features_types=(chore feat style)
|
||||||
|
changes_types=(refactor perf)
|
||||||
|
fix_types=(fix revert)
|
||||||
|
file="CHANGELOG.md"
|
||||||
|
file_tmp="temp_log.txt"
|
||||||
|
file_current_tmp="temp_current_log.txt"
|
||||||
|
|
||||||
|
setType(){
|
||||||
|
echo "### $1" >> $file_tmp
|
||||||
|
arr=("$@")
|
||||||
|
echo "" > $file_current_tmp
|
||||||
|
for i in "${arr[@]}"
|
||||||
|
do
|
||||||
|
git log --grep="$i" --oneline --no-merges --format="- %s %d by:%an" master..test >> $file_current_tmp
|
||||||
|
done
|
||||||
|
# remove duplicates
|
||||||
|
sort -o $file_current_tmp -u $file_current_tmp
|
||||||
|
cat $file_current_tmp >> $file_tmp
|
||||||
|
echo "" >> $file_tmp
|
||||||
|
# remove tmp current file
|
||||||
|
[ -e $file_current_tmp ] && rm $file_current_tmp
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "# Version XX.XX - XXXX-XX-XX" >> $file_tmp
|
||||||
|
echo "" >> $file_tmp
|
||||||
|
|
||||||
|
setType "Added 🆕" "${features_types[@]}"
|
||||||
|
setType "Changed 📦" "${changes_types[@]}"
|
||||||
|
setType "Fixed 🛠️" "${fix_types[@]}"
|
||||||
|
|
||||||
|
cat $file >> $file_tmp
|
||||||
|
mv $file_tmp $file
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue