Skip to content

Commit

Permalink
Improvements to release note generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash committed Jan 10, 2017
1 parent eb836c7 commit 35c6c3e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ This document outlines the process for creating a new BLT release.

To perform a release:

1. [Run tests](#testing) locally..
1. [Run tests](#testing) locally.
1. [Generate and commit updated CHANGELOG.md](#generate-changelogmd).
1. [Create a release](#create-a-release)

Expand Down
4 changes: 1 addition & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ pages:
- Automated testing: 'readme/testing.md'
- Technical Architect:
- Deploying to cloud: 'readme/deploy.md'
- Releases:
- Release process: 'readme/release-process.md'
- Release notes: 'scripts/release-notes/README.md'
- Release process: 'readme/release-process.md'
- Setting up continuous integration: 'readme/ci.md'
- Setting up SSO with SimpleSAMLphp: 'readme/simplesamlphp-setup.md'
- Open source contribution: 'readme/os-contribution.md'
Expand Down
10 changes: 9 additions & 1 deletion src/Robo/Command/BltInternal.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function bltRelease($tag, $github_token)
return 1;
}

// @todo Check to see if git branch is dirty.
$this->yell("This will destroy any uncommitted work on the current branch. It will also hard reset 8.x and 8.x-release to match the upstream history.");
$continue = $this->confirm("Continue?");

Expand All @@ -44,14 +45,17 @@ public function bltRelease($tag, $github_token)
// Clean up all staged and unstaged files on current branch.
$this->_exec('git clean -fd .');
$this->_exec('git remote update');
// @todo Check to see if branch doesn't match, confirm with dialog.
$this->_exec('git reset --hard');

// Reset local 8.x to match upstream history of 8.x.
$this->_exec('git checkout 8.x');
// @todo Check to see if branch doesn't match, confirm with dialog.
$this->_exec('git reset --hard origin/8.x');

// Reset local 8.x-release to match upstream history of 8.x-release.
$this->_exec('git checkout 8.x-release');
// @todo Check to see if branch doesn't match, confirm with dialog.
$this->_exec('git reset --hard origin/8.x-release');

// Merge 8.x into 8.x-release and push.
Expand All @@ -77,6 +81,7 @@ public function bltRelease($tag, $github_token)
'access_token' => $github_token,
],
]);
// @todo Check to see if release already exists, update if it does.
$response = $client->request('POST', 'releases', [
'json' => $request_payload,
]);
Expand Down Expand Up @@ -108,6 +113,7 @@ public function bltReleaseNotes($tag, $github_token) {
return 1;
}

// @todo Check to see if git branch is dirty.
$this->yell("You should execute this command on a clean, updated checkout of 8.x.");
$continue = $this->confirm("Continue?");

Expand All @@ -128,7 +134,9 @@ public function bltReleaseNotes($tag, $github_token) {
$new_full_changelog = $trimmed_partial_changelog . $trimmed_full_changelog;
file_put_contents($full_changelog_filename, $new_full_changelog);

$this->say("$full_changelog_filename has been updated. Please commit and PUSH the changes.");
$this->say("$full_changelog_filename has been updated and committed. Please push to origin.");
$this->_exec("git add $full_changelog_filename");
$this->_exec("git commit -m 'Updating $full_changelog_filename with $tag release notes.'");

return 0;
}
Expand Down

0 comments on commit 35c6c3e

Please sign in to comment.