Skip to content

Commit 0b4de3f

Browse files
committed
Better versioning
1 parent b7a42e0 commit 0b4de3f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

update.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
$number = 0;
4646
foreach ($parts as $index => $part)
4747
{
48-
$number *= 100 + (int)$part;
48+
$number = $number * 100 + (int)$part;
4949
}
5050
$highest = max($number, $highest);
5151
}
52-
if ($highest > $proposed)
52+
if ($highest >= $proposed)
5353
{
5454
$proposed = $highest + 1;
5555
}
@@ -59,7 +59,8 @@
5959

6060
// commit and tag it with version number
6161
$date = date('Y-m-d');
62-
$repo->run('commit', ['-m', "'{$version} - {$date}'"]);
62+
echo "{$version} - {$date}";
63+
$repo->run('commit', ['-m', "{$version} - {$date}"]);
6364
$repo->run('tag', ['-a', $version, '-m', "'Auto generated on {$date}'"]);
6465

6566
// push and publish

0 commit comments

Comments
 (0)