Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add command to do package release branches #6

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

pookmish
Copy link
Contributor

@pookmish pookmish commented Sep 7, 2021

READY FOR REVIEW/NOT READY

  • (Edit the above to reflect status)

Summary

  • TL;DR - what's this PR for?

Needed By (Date)

  • When does this need to be merged by?

Urgency

  • How critical is this PR?

Steps to Test

  1. Do this
  2. Then this
  3. Then this

Affected Projects or Products

  • Does this PR impact any particular projects, products, or modules?

Associated Issues and/or People

  • JIRA ticket
  • Other PRs
  • Any other contextual information that might be helpful (e.g., description of a bug that this PR fixes, new functionality that it adds, etc.)
  • Anyone who should be notified? (@mention them here)

See Also

Copy link

@imonroe imonroe left a comment

Choose a reason for hiding this comment

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

Nice work! Much cleaner than mine, and I like the trick with composer.

*/
public function swsReleases($options = ['packages' => '']) {
$docroot = $this->getConfigValue('docroot');
foreach (glob("$docroot/*/custom/*/*info.yml") as $package) {
Copy link

Choose a reason for hiding this comment

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

This is neat. I was using arrays of our packages.

->run()
->getMessage();

$matches = preg_grep('/^-.*su-.*?$/', explode("\n", $composer_diff));
Copy link

Choose a reason for hiding this comment

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

I like this; nice and efficient and it lets composer do the work.

->push('origin', "release-$release_version")
->run();
sleep(1);
$this->taskExec("gh pr create -B $base_branch --title $release_version --body $version")
Copy link

Choose a reason for hiding this comment

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

Worth noting that it requires gh be installed, which is likely not the case for everyone. 🤷

->setHeader(implode(PHP_EOL, $header))
->setBody(implode("\n", $log) . PHP_EOL)
->anchor($anchor)
->run();
Copy link

Choose a reason for hiding this comment

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

This would be the right place to extract the changes for staci, et. al. if you just append them to a file somewhere convenient, yeah?

->run();
}

$finder = new Finder();
Copy link

Choose a reason for hiding this comment

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

A lot more efficient than my method.

Copy link

@imonroe imonroe left a comment

Choose a reason for hiding this comment

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

Looks like this is just for the sake of clarity?

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