Skip to content

Commit 95598a6

Browse files
ci: silence changelog generator warning emission, not useful when running by hand (brainboxdotcc#814)
1 parent e7d63d3 commit 95598a6

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

Diff for: buildtools/changelog.php

+13-6
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
$errors = [];
6565

6666
// Magic sauce
67-
exec("git log --format=\"%s\" $(git log --no-walk --tags | head -n1 | cut -d ' ' -f 2)..HEAD | grep -v '^Merge '", $changelog);
67+
exec("git log --oneline --format=\"%s\" $(git log --no-walk --tags | head -n1 | cut -d ' ' -f 2)..HEAD | grep -v '^Merge '", $changelog);
6868

6969
// Case insensitive removal of duplicates
7070
$changelog = array_intersect_key($changelog, array_unique(array_map("strtolower", $changelog)));
@@ -193,7 +193,7 @@ function add_change(string $change, string $category, string $scope = null) {
193193
if ($githubstyle) {
194194
echo "The changelog is listed below:\n\nRelease Changelog\n===========\n";
195195
} else {
196-
echo "The changelog is listed below:\n\n__**Release Changelog**__\n";
196+
echo "The changelog is listed below:\n\n## Release Changelog\n";
197197
}
198198

199199
function print_change(string $change) {
@@ -208,7 +208,7 @@ function print_change(string $change) {
208208
// Output tidy formatting
209209
foreach ($catgroup as $cat => $list) {
210210
if (!empty($list)) {
211-
echo "\n" . ($githubstyle ? '## ' : '__**') . $cat . ($githubstyle ? '' : '**__') . "\n";
211+
echo "\n" . ($githubstyle ? '## ' : '### ') . $cat . "\n";
212212
foreach ($list as $key => $item) {
213213
if (is_array($item)) {
214214
foreach ($item as $change) {
@@ -230,6 +230,13 @@ function print_change(string $change) {
230230
echo "\n";
231231
}
232232

233-
foreach ($errors as $err) {
234-
trigger_error($err, E_USER_WARNING);
235-
}
233+
/*
234+
* Disabled as it generates pages and pages of stack traces, making it
235+
* extremely difficult to copy and paste the error log when running this
236+
* on the command line for sending discord announcement changelogs.
237+
*
238+
* foreach ($errors as $err) {
239+
* trigger_error($err, E_USER_WARNING);
240+
* }
241+
*
242+
*/

0 commit comments

Comments
 (0)