]> BookStack Code Mirror - devops/blobdiff - meta-scripts/bookstack-changelog
24.04 script, switched to php-fpm, force-started services
[devops] / meta-scripts / bookstack-changelog
index 4976ad7fd8b50c4eafac6776c31715380d99e8b2..26576ec3c01002ca3e592c023d6fca16edf24948 100755 (executable)
@@ -35,8 +35,16 @@ if (count($argv) < 2) {
 
 // Get milestone info from GitHub
 $milestoneID = intval($argv[1]);
+
+$issues = [];
+$requestIssues = [];
+$page = 1;
 $issueURL = 'https://api.github.com/repos/BookStackApp/BookStack/issues?milestone='. $milestoneID .'&state=all';
-$issues = getJSON($issueURL);
+do {
+       $requestIssues = getJSON($issueURL . '&page=' . $page);
+       $issues = array_merge($issues, $requestIssues);
+       $page++;
+} while (count($requestIssues) > 0);
 
 // Get BookStack version and check if a feature or minor release
 $milestone = $issues[0]['milestone'];
@@ -44,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 Beta {$version}\n");
+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)");
-    output("- [Update details on blog](https://www.bookstackapp.com/blog/beta-release-{$urlVersion}/)");
-    output("\n### Full List of Changes\n");
-} else {
-    output("\nThis release contains the following fixes and changes:\n");
+    $urlVersion = implode('-', $splitVersion);
+    output("- [Update details on blog](https://www.bookstackapp.com/blog/bookstack-release-{$urlVersion}/)");
 }
 
+output("\n### Full List of Changes\n");
+output("This release contains the following fixes and changes:\n");
+
 // Output issues
 foreach ($issues as $issue) {
        $output = '* ';