Add checking that a related versions were found

[MAILPOET-6097]
This commit is contained in:
Jan Lysý
2024-06-18 16:48:00 +02:00
committed by Jan Lysý
parent c72c876fb3
commit 92fdefda91
3 changed files with 39 additions and 12 deletions

View File

@ -34,7 +34,16 @@ $stableVersions = filterStableVersions($allVersions);
echo "Latest Automate Woo version: $latestVersion\n";
echo "Previous Automate Woo version: $previousVersion\n";
echo "Replacing the latest version in the config file...\n";
replaceLatestVersion($latestVersion);
echo "Replacing the previous version in the config file...\n";
replacePreviousVersion($previousVersion);
if ($latestVersion) {
echo "Replacing the latest version in the config file...\n";
replaceLatestVersion($latestVersion);
} else {
echo "No latest version found.\n";
}
if ($previousVersion) {
echo "Replacing the previous version in the config file...\n";
replacePreviousVersion($previousVersion);
} else {
echo "No previous version found.\n";
}

View File

@ -34,7 +34,16 @@ $stableVersions = filterStableVersions($allVersions);
echo "Latest WooCommerce Memberships version: $latestVersion\n";
echo "Previous WooCommerce Memberships version: $previousVersion\n";
echo "Replacing the latest version in the config file...\n";
replaceLatestVersion($latestVersion);
echo "Replacing the previous version in the config file...\n";
replacePreviousVersion($previousVersion);
if ($latestVersion) {
echo "Replacing the latest version in the config file...\n";
replaceLatestVersion($latestVersion);
} else {
echo "No latest version found.\n";
}
if ($previousVersion) {
echo "Replacing the previous version in the config file...\n";
replacePreviousVersion($previousVersion);
} else {
echo "No previous version found.\n";
}

View File

@ -34,7 +34,16 @@ $stableVersions = filterStableVersions($allVersions);
echo "Latest WooCommerce Subscriptions version: $latestVersion\n";
echo "Previous WooCommerce Subscriptions version: $previousVersion\n";
echo "Replacing the latest version in the config file...\n";
replaceLatestVersion($latestVersion);
echo "Replacing the previous version in the config file...\n";
replacePreviousVersion($previousVersion);
if ($latestVersion) {
echo "Replacing the latest version in the config file...\n";
replaceLatestVersion($latestVersion);
} else {
echo "No latest version found.\n";
}
if ($previousVersion) {
echo "Replacing the previous version in the config file...\n";
replacePreviousVersion($previousVersion);
} else {
echo "No previous version found.\n";
}