diff --git a/bin/publish-latest-branch-build.php b/bin/publish-latest-branch-build.php --- a/bin/publish-latest-branch-build.php +++ b/bin/publish-latest-branch-build.php @@ -195,6 +195,15 @@ $phorge_apk_lines[] = $apk_line; $phorge_apk_lines[] = ""; } + + // Send message to Phorge. + echo "Adding bipbop Comment to $phorge_document_id\n"; + shell_exec(sprintf( + "~/bin/phab-comment.php %s %s %s", + escapeshellarg($phorge_document_id), + escapeshellarg($generated_apk->getURL()), + escapeshellarg($generated_apk->getHash()) + )); } $telegram_apk_lines_str = implode("\n", $telegram_apk_lines); $phorge_apk_lines_str = implode("\n", $phorge_apk_lines); @@ -221,14 +230,7 @@ // See the TELEGRAM_* environment variables. (new TelegramStupidSDK())->sendMessage($telegram_chat_content); - // Send message to Phorge. - echo "Adding bipbop Comment to $phorge_document_id\n"; - shell_exec(sprintf( - "~/bin/phab-comment.php %s %s %s", - escapeshellarg($phorge_document_id), - escapeshellarg($apk_aligned_signed_url), - escapeshellarg($apk_raw_sha256) - )); + } else { // We have NOT a Differentials revision under review! // So this is an atomic commit. diff --git a/include/APK.php b/include/APK.php --- a/include/APK.php +++ b/include/APK.php @@ -41,6 +41,19 @@ return $this->ABI; } + /** + * Get the final URL. + */ + public function getURL(): string { + return $this->url; + } + + /** + * Get the sha256 of the APK file. + */ + public function getHash(): string { + return $this->sha256; + } /** * @return array */