version
version copied to clipboard
Weird issue with commit number going hex on me
I have this in version.yml:
commit:
mode: increment
length: 6
increment-by: 1
But when I move from commit number "10" to what should be "11", things move to "10e". Am I missing something?
After further review, it would seem that incrementing the commit level is always done this way:
public function incrementCommit($by = null)
{
$result = $this->increment(function ($config) use ($by) {
$increment_by = $by ?: $config['commit']['increment-by'];
$config['current']['commit'] = $this->incrementHex($config['current']['commit'], $increment_by);
return $config;
}, 'commit.number');
event(Constants::EVENT_COMMIT_INCREMENTED);
return $result;
}
Not sure why that is, but I would think having this in the config should increment it by a value of 1 (decimal, not hex) just like the major, minor, etc.
commit:
mode: increment
length: 6
increment-by: 1