Merge pull request 'feat: refs #6428 auto-changelog with bash' (!2338) from 6428-auto-changeLog into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2338 Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
commit
44c4432c67
|
@ -1,3 +1,4 @@
|
|||
|
||||
# Changelog
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
## Generate changeLog test → master
|
||||
```
|
||||
$ bash changelog.sh
|
||||
```
|
||||
|
||||
|
||||
## Visual Studio Code extensions
|
||||
|
||||
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