Add used WordPress versions to the commit message

[MAILPOET-6097]
This commit is contained in:
Jan Lysý
2024-06-19 19:53:56 +02:00
committed by Rostislav Wolný
parent 8e3f7faa0e
commit 318424f0c4
3 changed files with 62 additions and 14 deletions

View File

@@ -69,3 +69,14 @@ function fetchGitHubTags($repo, $token) {
return array_column($data, 'name');
}
function saveVersionsToFile($latestVersion, $previousVersion, $fileName): void {
$value = "";
if ($latestVersion) {
$value .= "- latest version: {$latestVersion}\n";
}
if ($previousVersion) {
$value .= "- previous version: {$previousVersion}\n";
}
file_put_contents("/tmp/{$fileName}", $value);
}