]> BookStack Code Mirror - devops/commitdiff
Updated changelog script
authorDan Brown <redacted>
Mon, 4 Oct 2021 15:39:56 +0000 (16:39 +0100)
committerDan Brown <redacted>
Mon, 4 Oct 2021 15:39:56 +0000 (16:39 +0100)
Better aligns to version changes and recent release note convention

meta-scripts/bookstack-changelog

index b4c318c8a9f61fb7bd22b63104d782d49b7743c9..26576ec3c01002ca3e592c023d6fca16edf24948 100755 (executable)
@@ -52,21 +52,22 @@ $versionMatch = [];
 preg_match('/v[0-9.]{5,7}/', $milestone['title'], $versionMatch);
 $version = $versionMatch[0];
 $splitVersion = explode('.', $version);
-$isFeature = intval(array_pop($splitVersion)) === 0;
+$isFeature = count($splitVersion) === 2;
 
 // Output title
 output("# BookStack {$version}\n");
 
 // Output header text and links
+output("### Links\n");
+output("- [Update instructions](https://www.bookstackapp.com/docs/admin/updates)");
 if ($isFeature) {
-    $urlVersion = implode('0', $splitVersion);
-    output("- [Update instructions](https://www.bookstackapp.com/docs/admin/updates)");
+    $urlVersion = implode('-', $splitVersion);
     output("- [Update details on blog](https://www.bookstackapp.com/blog/bookstack-release-{$urlVersion}/)");
-    output("\n### Full List of Changes\n");
-} else {
-    output("\nThis release contains the following fixes and changes:\n");
 }
 
+output("\n### Full List of Changes\n");
+output("This release contains the following fixes and changes:\n");
+
 // Output issues
 foreach ($issues as $issue) {
        $output = '* ';