Beta releases: collapsable list of changes (#4339)

* add collapsable list

* make it show commit count

* why not have it also know the release type and name

* update the template as well

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
This commit is contained in:
tooomm 2021-05-12 17:27:20 +02:00 committed by GitHub
parent 5f32892e75
commit 0a73162bcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 6 deletions

View file

@ -47,8 +47,13 @@ if [[ $no_beta ]]; then
fi
body="${body//--REPLACE-WITH-RELEASE-TITLE--/$title}"
else
body="Included commits over previous version:
--REPLACE-WITH-GENERATED-LIST--"
body="--REPLACE-WITH-COMMIT-COUNT-- commits have been included over the previous --REPLACE-WITH-PREVIOUS-RELEASE-TYPE--
<details>
<summary><b>show changes</b></summary>
--REPLACE-WITH-GENERATED-LIST--
</details>"
fi
# add git log to release notes
@ -78,11 +83,15 @@ else
if [[ $previous ]]; then
if generated_list="$(git log "$previous..$TAG" --pretty="- %s")"; then
count="$(git rev-list --count "$previous..$TAG")"
[[ $previous =~ $beta_regex ]] && previousreleasetype="beta release" || previousreleasetype="full release"
echo "adding list of commits to release notes:"
echo "'$previous' to '$TAG' ($count commits)"
# --> is the markdown comment escape sequence, emojis are way better
generated_list="${generated_list//-->/→}"
body="${body//--REPLACE-WITH-GENERATED-LIST--/$generated_list}"
body="${body//--REPLACE-WITH-COMMIT-COUNT--/$count}"
body="${body//--REPLACE-WITH-PREVIOUS-RELEASE-TAG--/$previous}"
body="${body//--REPLACE-WITH-PREVIOUS-RELEASE-TYPE--/$previousreleasetype}"
if [[ $beta_list =~ $whitespace ]]; then
beta_list="-n there are no betas to delete!"
else

View file

@ -16,8 +16,10 @@ include different targets -->
- <kbd>Ubuntu 18.04</kbd> ("Bionic Beaver")</i>
- <kbd>Ubuntu 20.04</kbd> ("Focal Fossa")</i>
- <kbd>Ubuntu 20.10</kbd> ("Groovy Gorilla")</i>
- <kbd>Ubuntu 21.04</kbd> ("Hirsute Hippo")</i>
- <kbd>Debian 10</kbd> ("Buster")</i>
- <kbd>Fedora 33</kbd></i>
- <kbd>Fedora 34</kbd></i>
<kbd>We are also packaged in Arch Linux's official community repository, courtesy of @FFY00</kbd></i>
<kbd>General linux support is available via a flatpak package (Flathub)</kbd></i>
</pre>
@ -38,6 +40,11 @@ If you'd like to help contribute to Cockatrice in any way, check out our [README
## Upgrading Cockatrice
<!-- this optional section puts a warning banner for problems with updating
> ⚠️ **With this release, we no longer provide a ready-to-install binary for:**
> --DEPRECATED-OS-HERE--
-->
- Run the internal software updater: <kbd>Help → Check for Client Updates</kbd>
Don't forget to update your card database right after! (<kbd>Help → Check for Card Updates...</kbd>)
@ -61,10 +68,9 @@ Remove empty headers when done.
<!-- Complete list of changes (foldable) -->
<details>
<summary>📘 <b>Show all changes <code>
<!-- Count of other changes -->
</code></b></summary>
<summary>
📘 <b>Show all changes</b> (--REPLACE-WITH-COMMIT-COUNT-- commits)
</summary>
### User Interface
### Under the Hood