mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
Merge pull request #2691 from Bnyro/master
Improve the script to generate changelogs
This commit is contained in:
commit
6e0610e26c
48
changelog.sh
48
changelog.sh
@ -10,12 +10,6 @@ TEXT=$(printf "${TEXT[@]}" | sed 's/.*Weblate.*//g' | sed 's/.*dependency.*//g')
|
|||||||
# go through all the lines inside the file
|
# go through all the lines inside the file
|
||||||
readarray -t y <<< "${TEXT[@]}"
|
readarray -t y <<< "${TEXT[@]}"
|
||||||
|
|
||||||
echoall() {
|
|
||||||
for line in "$@"; do
|
|
||||||
echo "$line"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
FIXES=()
|
FIXES=()
|
||||||
FEATURES=()
|
FEATURES=()
|
||||||
IMPROVEMENTS=()
|
IMPROVEMENTS=()
|
||||||
@ -34,21 +28,37 @@ for line in "${y[@]}" ; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# function for echoing all items of an array, one per line
|
||||||
|
echoall() {
|
||||||
|
for line in "$@"; do
|
||||||
|
echo "$line"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# Print all the found and categorized changes
|
# Print all the found and categorized changes
|
||||||
echo "## New features"
|
create_changelog() {
|
||||||
echoall "${FEATURES[@]}"
|
echo "## New features"
|
||||||
echo ""
|
echoall "${FEATURES[@]}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
echo "## Minor changes"
|
echo "## Minor changes"
|
||||||
echoall "${IMPROVEMENTS[@]}"
|
echoall "${IMPROVEMENTS[@]}"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "## Bug fixes"
|
echo "## Bug fixes"
|
||||||
echoall "${FIXES[@]}"
|
echoall "${FIXES[@]}"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "## Repo changes"
|
echo "## Repo changes"
|
||||||
echoall "${REPOCHANGES[@]}"
|
echoall "${REPOCHANGES[@]}"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "$FULLCHANGELOG"
|
echo "$FULLCHANGELOG"
|
||||||
|
}
|
||||||
|
|
||||||
|
# generate a new changelog
|
||||||
|
CHANGELOG=$(create_changelog)
|
||||||
|
# write the changelog into the file
|
||||||
|
echo "$CHANGELOG" > "$1"
|
||||||
|
|
||||||
|
echo "Done."
|
||||||
|
Loading…
Reference in New Issue
Block a user