Skip to content

Commit

Permalink
Added support for AUTHORS.md
Browse files Browse the repository at this point in the history
Details:

* Added support for a new make target 'authors' that generates an AUTHORS.md
  file from the git commit history. Added the invocation of 'make authors' to
  the description of how to release a version in the development
  documentation. (issue #541)

Signed-off-by: Andreas Maier <[email protected]>
  • Loading branch information
andy-maier committed Feb 13, 2024
1 parent b46358f commit 324efb4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ help:
@echo ' all - Do all of the above'
@echo " end2end - Run end2end tests (adds to coverage results)"
@echo " end2end_show - Show HMCs defined for end2end tests"
@echo ' authors - Generate AUTHORS.md file from git log'
@echo ' uninstall - Uninstall package from active Python environment'
@echo ' upload - Upload the distribution files to PyPI (includes uninstall+build)'
@echo ' clean - Remove any temporary files'
Expand Down Expand Up @@ -425,6 +426,16 @@ $(done_dir)/install_$(pymn)_$(PACKAGE_LEVEL).done: $(done_dir)/base_$(pymn)_$(PA
@echo 'Done: Installed $(package_name)'
echo "done" >$@

.PHONY: authors
authors: _check_version
echo "# Authors of this project" >AUTHORS.md
echo "" >>AUTHORS.md
echo "Sorted list of authors derived from git commit history:" >>AUTHORS.md
echo '```' >>AUTHORS.md
git shortlog --summary --email | cut -f 2 | sort >>AUTHORS.md
echo '```' >>AUTHORS.md
@echo '$@ done.'

.PHONY: uninstall
uninstall:
bash -c '$(PIP_CMD) show $(package_name) >/dev/null; if [ $$? -eq 0 ]; then $(PIP_CMD) uninstall -y $(package_name); fi'
Expand Down
5 changes: 5 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ Released: not yet
* Fail partition/lpar list commands if the specified CPC does not exist.
(issue #514)

* Added support for a new make target 'authors' that generates an AUTHORS.md
file from the git commit history. Added the invocation of 'make authors' to
the description of how to release a version in the development
documentation. (issue #541)

**Cleanup:**

* Fixed copyright statements (issue #542)
Expand Down
18 changes: 12 additions & 6 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -422,14 +422,20 @@ local clone of the zhmccli Git repo.
add text for any known issues you want users to know about.
* Remove all empty list items.

6. Commit your changes and push the topic branch to the remote repo:
6. Update the authors:

.. code-block:: sh
make authors
7. Commit your changes and push the topic branch to the remote repo:

.. code-block:: sh
git commit -asm "Release ${MNU}"
git push --set-upstream origin release_${MNU}
7. On GitHub, create a Pull Request for branch ``release_M.N.U``.
8. On GitHub, create a Pull Request for branch ``release_M.N.U``.

Important: When creating Pull Requests, GitHub by default targets the
``master`` branch. When releasing based on a stable branch, you need to
Expand All @@ -444,19 +450,19 @@ local clone of the zhmccli Git repo.
tests for all defined environments, since it discovers by the branch name
that this is a PR for a release.

8. On GitHub, once the checks for that Pull Request have succeeded, merge the
9. On GitHub, once the checks for that Pull Request have succeeded, merge the
Pull Request (no review is needed). This automatically deletes the branch
on GitHub.

If the PR did not succeed, fix the issues.

9. On GitHub, close milestone ``M.N.U``.
10. On GitHub, close milestone ``M.N.U``.

Verify that the milestone has no open items anymore. If it does have open
items, investigate why and fix. If the milestone does not have open items
anymore, close the milestone.

10. Publish the package
11. Publish the package

.. code-block:: sh
Expand All @@ -472,7 +478,7 @@ local clone of the zhmccli Git repo.
Github, and finally creates a new stable branch on Github if the master
branch was released.

11. Verify the publishing
12. Verify the publishing

Wait for the "publish" workflow for the new release to have completed:
https://github.com/zhmcclient/zhmccli/actions/workflows/publish.yml
Expand Down

0 comments on commit 324efb4

Please sign in to comment.