-
Notifications
You must be signed in to change notification settings - Fork 199
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 Release Preparation scripts #6713
Conversation
Codecov Report
@@ Coverage Diff @@
## trunk #6713 +/- ##
============================================
+ Coverage 48.25% 49.32% +1.07%
- Complexity 10534 10538 +4
============================================
Files 575 575
Lines 44441 44501 +60
Branches 402 402
============================================
+ Hits 21443 21950 +507
+ Misses 22671 22224 -447
Partials 327 327
... and 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
8531cc6
to
937e55b
Compare
scripts/release-steps.sh
Outdated
|
||
# Create working directory and checkout Sensei. | ||
mkdir /release && cd /release | ||
git clone [email protected]:Automattic/sensei.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a CI context, we should use the commit hash the pipeline is executing to make sure we are releasing the exact version that we decide to release.
Maybe we can just assume the clone was done previously.
scripts/release-steps.sh
Outdated
# Create the release branch. | ||
git switch -c "release/$NEXT_VERSION" | ||
|
||
echo "Replace next version tag" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need update the package.json and the sensei-lms.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Should be part of one of our scripts. Or maybe separate scripts?
…i into add/release-branch-prep
Example of creating a release PR from |
[x] Update constant in sensei-lms.php |
[x] Don't remove jest from package-json |
[x] Update Stable tag in readme.txt |
I think it makes sense for the release script to run the copy-changelog-to-readme.php script as well. WDYT? |
That's a good question. I wasn't sure about that, because I thought the changelog needs some manual edits almost always. So it is better to run copy-script manually later. |
Nice!
This shouldn't be the case. Last time was an exception because the readme.txt changelog section was out of sync with the changelog.txt. Our aim is for both to be the same. |
Added. |
…i into add/release-branch-prep
@merkushin Curious what the status of this one is. I think there are still some comments to address? If so, should we move it back to To Do? |
@donnapep I don't see any open questions at the moment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well with a few minor issues that might be related to my setup! I think we should merge it and any further issues can be fixed on the go.
One such issue that I'm facing is the following error after running ./scripts/release-pr.sh 9.9.9
:
includes/class-sensei.php:824: Unexpected `$$next-version$$` token.
To test the release script, I had to comment out the ./scripts/replace-next-version-tag.sh
part. But maybe that's something related to my setup.
Another issue that I've faced was:
git clone [email protected]:Automattic/sensei.git
Cloning into 'sensei'...
/root/.ssh/config: line 14: Bad configuration option: usekeychain
/root/.ssh/config: terminating, 1 bad configuration options
But I've managed to fix that by adding IgnoreUnknown UseKeychain
to my ssh config:
IgnoreUnknown UseKeychain
UseKeychain yes
I've also had to bump the git version because the git commit gpgsign
was not working. (c1a9bb1)
Thank you @m1r0!
You can see it fixed in this PR: You can try to deploy this branch to avoid encountering the issue.
Oh, I don't use the keychain for this purpose, so I didn't encounter this issue. We can find a better solution together later. |
Resolves #6664
Introduces some automation and platform/environment independence to the release PR preparation.
Please, check the RELEASE.md document for more information on these scripts.
Proposed Changes
Testing Instructions
./scripts/release.sh X.Y.Z
, whereX.Y.Z
is the version to release. It will create the branch and the PR with a respective name../scripts/release.sh X.Y.Z branch-name
, whereX.Y.Z
is the version to release andbranch-name
is the name of the branch you want to release. It will create the branch and the PR with a respective name.Demo
p1679982821332209/1679948199.557769-slack-C02NWDZBL0H
Pre-Merge Checklist