Skip to content

Conversation

@baileylo
Copy link

This will allow teams that don't use SemVer to define their own Version and use
the same bump commands.

This is still in development phase(I haven't tested beyond unit tests), just curious about your feedback.

This will allow teams that don't use SemVer to define their own Version and use
the same bump commands.

public function __construct($tag)
{
if ($this->init($tag)) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be able to remove the init method entirely.

*
* @return self
*/
protected function bumpPatch()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move protected methods below other public functions maybe?

/**
* @inheritdoc
*/
public function getTag()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move these public functions before bump, that way importance of the protected methods isn't lost.

$base_tag = $this->getMock(Version::class);
$lower_tag = $this->getMock(Version::class);
$upper_tag = $this->getMock(Version::class);

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra space

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to leave room for my code to breathe, sir.

public function bumpDataProvider()
{
return [
'patch' => ['patch', '1.5.1', '1.5.2'],
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass in the instances of SemVer here, so that it's similar to the compare test.

}

$current_version = implode('.', [$major, $minor, $patch]);
$comparison = new \Bump\Compare(function ($tag) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice if there was some way to set this up(service provider) out side of bump, oh well though :(.


passthru('git tag ' . $bumped_version);
passthru('git push origin ' . $bumped_version);
passthru('git tag ' . $next_tag->formatTag());
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method, formatTag, was renamed to getTag.

*/
public function bump($touple)
{
$touple_map = [
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method_map makes more sense here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants