diff --git a/generate.php b/generate.php
index e566ec6..d21a203 100644
--- a/generate.php
+++ b/generate.php
@@ -86,6 +86,7 @@ function getClassByNbCommitsAhead(int $nbCommitsAhead): string
'multiple_milestones' => [],
'version_mismatch' => [],
'wrong_version' => [],
+ 'missing_zip' => [],
];
$template = file_get_contents(__DIR__.'/src/template.tpl');
@@ -108,6 +109,10 @@ function getClassByNbCommitsAhead(int $nbCommitsAhead): string
$lastReleaseInformation[] = 'Release not published yet!';
$notifications['not_published'][] = $moduleName;
}
+ if ($data['latestRelease']['built_zip'] === false) {
+ $lastReleaseInformation[] = 'Release is missing built ZIP!';
+ $notifications['missing_zip'][] = $moduleName;
+ }
} else {
$lastReleaseInformation[] = 'No release yet';
}
@@ -252,6 +257,11 @@ function getClassByNbCommitsAhead(int $nbCommitsAhead): string
Versions of modules ' . implode(', ', $notifications['wrong_version']) . ' don\'t match the last or any current open milestone.
';
}
+if (!empty($notifications['missing_zip'])) {
+ $notifications_html .= '
+ Modules ' . implode(', ', $notifications['missing_zip']) . ' don\'t have a proper built ZIP attached.
+
';
+}
if (!empty($notifications['not_published'])) {
$notifications_html .= '
Modules ' . implode(', ', $notifications['not_published']) . ' have releases created, but not published.
diff --git a/src/BranchManager.php b/src/BranchManager.php
index 3322bdf..838e7f1 100644
--- a/src/BranchManager.php
+++ b/src/BranchManager.php
@@ -37,12 +37,22 @@ public function getReleaseData($repositoryName)
$repositoryName,
);
if (!empty($release)) {
+ // Check if there is a proper zip attached
+ $built_zip = false;
+ foreach ($release['assets'] as $asset) {
+ if ($asset['name'] == $repositoryName . '.zip') {
+ $built_zip = true;
+ }
+ }
+
+ // Load info about the release
$latestRelease = [
'date' => (new DateTime($release['created_at']))->format('Y-m-d H:i:s'),
'name' => $release['name'],
'tag' => $release['tag_name'],
'url' => $release['html_url'],
'date_published' => (new DateTime($release['published_at']))->format('Y-m-d H:i:s'),
+ 'built_zip' => $built_zip,
];
}
} catch (Exception $e) {