diff --git a/bin/publish-latest-branch-build.php b/bin/publish-latest-branch-build.php index ba399a9..4a0b86d 100755 --- a/bin/publish-latest-branch-build.php +++ b/bin/publish-latest-branch-build.php @@ -1,224 +1,225 @@ #!/usr/bin/env php getPhorgeCommentLines() as $apk_line) { $phorge_apk_lines[] = $apk_line; + $phorge_apk_lines[] = ""; } } $lines = implode("\n", $phorge_apk_lines); $telegram_chat_content = $header . "\n\n" . $lines; // Send message to Telegram groups. echo "DEBUG TELEGRAM CONTENT\n"; echo "$telegram_chat_content\n"; // Send message to your default Telegram group. // 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_destination_url), escapeshellarg($apk_sha256) )); } else { // We have NOT a Differentials revision under review! // So this is an atomic commit. $telegram_chat_content = implode("\n", [ "🌚 New commit: *$git_commit_title*", "https://gitpull.it/R4:$git_commit", "", "Try this fresh test APK:", "[Download $apk_destination_name_escaped]($apk_destination_url_escaped)", "", "APK fingerprint sha256:", "`$apk_sha256`" ]); echo "DEBUG TELEGRAM CONTENT\n"; echo "$telegram_chat_content\n"; // Send message to your default Telegram group. // See the TELEGRAM_* environment variables. (new TelegramStupidSDK())->sendMessage($telegram_chat_content); } // delete very old files print_log_info("Cleaning old artifacts"); shell_exec(sprintf( "find %s -type f -mtime +120 -delete", escapeshellarg($ARTIFACTS_PATH) )); print_log_info("Done"); diff --git a/include/APK.php b/include/APK.php index c959a3d..0ced1f5 100644 --- a/include/APK.php +++ b/include/APK.php @@ -1,53 +1,53 @@ name = $name; $this->url = $url; $this->sha256 = $sha256; } /** * @return array */ public function getPhorgeCommentLines() { return [ $this->getPhorgeDownloadLink(), - '', // Empty newline between download link and signature + //'', // No Empty newline between download link and signature $this->getPhorgeAPKSignatureLine() ]; } /** * Get a very generic download link for Phorge. * @return string */ private function getPhorgeDownloadLink() { return sprintf( "[Download %s](%s)", $this->name, $this->url ); } /** * Get a very generic line about the sha256sum of this APK. * @return string */ private function getPhorgeAPKSignatureLine() { return sprintf( "APK sha256: `%s`", $this->sha256 ); } }