build-galaxy-release: Automatically create CHANGELOG.

Recent versions of ansible-test require the existence of a CHANGELOG
file in the root of the collection. This changes extracts the changes
of the latest available release tag using `utils/changelog` and create
the CHANGELOG file with the result of the command.

The generated changelog will include the changes for the latest release
and, if present, the available changes that were not part of a release.
This commit is contained in:
Rafael Guterres Jeffman
2022-05-10 16:06:22 -03:00
parent 5aa80204d5
commit d82abdbef9

View File

@@ -107,6 +107,11 @@ sed -i -e "s/name: .*/name: \"$collection\"/" galaxy.yml
find . -name "*~" -exec rm {} \;
echo "Creating CHANGELOG.rst..."
"$(dirname "$0")/changelog" --galaxy > CHANGELOG.rst
echo -e "\033[ACreating CHANGELOG.rst... \033[32;1mDONE\033[0m"
sed -i -e "s/ansible.module_utils.ansible_freeipa_module/ansible_collections.${collection_prefix}.plugins.module_utils.ansible_freeipa_module/" plugins/modules/*.py
(cd plugins/module_utils && {