Skip to content

Commit 7a63b4a

Browse files
authored
Fix the version reported in GitHub Actions for the refresh (#1916)
For packages with changes, the changelog check was overriding the variable used to store the last version of the AWS SDK.
1 parent 2262b7f commit 7a63b4a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/bin/refresh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ foreach ($services as $service => $hasChange) {
238238

239239
// Fix branch-alias in composer.json
240240
if ($hasChange) {
241-
$lastVersion = null;
241+
$lastPackageVersion = null;
242242
$level = 1;
243243
switch ($changeLog[4]) {
244244
case '### BC-BREAK':
@@ -249,22 +249,22 @@ foreach ($services as $service => $hasChange) {
249249
}
250250
foreach (\array_slice($changeLog, 4) as $line) {
251251
if (strpos($line, '## ') === 0) {
252-
$lastVersion = substr($line, 3);
252+
$lastPackageVersion = substr($line, 3);
253253

254254
break;
255255
}
256256
}
257-
if (empty($lastVersion)) {
257+
if (empty($lastPackageVersion)) {
258258
console_log('unable to find the next version in CHANGELOG');
259259

260260
exit(1);
261261
}
262-
if (!preg_match('/^\d+\.\d+\.\d+$/', $lastVersion)) {
262+
if (!preg_match('/^\d+\.\d+\.\d+$/', $lastPackageVersion)) {
263263
console_log('the last version in CHANGELOG is not a valid version');
264264

265265
exit(1);
266266
}
267-
$parts = explode('.', $lastVersion);
267+
$parts = explode('.', $lastPackageVersion);
268268
$level = 1;
269269
if (0 === (int) $parts[0]) {
270270
$level = min(2, $level + 1);

0 commit comments

Comments
 (0)