Skip to content

Commit 508344e

Browse files
committed
Update docs, remove triggers, add merging of the PR
1 parent 9ae2fce commit 508344e

File tree

12 files changed

+33
-818
lines changed

12 files changed

+33
-818
lines changed

.github/workflows/release-mongosh.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,10 @@ jobs:
5252
exit 1
5353
fi
5454
55-
- name: "Publish what is not already in NPM"
55+
- name: "Trigger mongosh publish"
5656
env:
5757
NPM_TOKEN: ${{ secrets.DEVTOOLSBOT_NPM_TOKEN }}
5858
MONGOSH_RELEASE_PUBLISHER: ${{ github.triggering_actor }}
5959
run: |
6060
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
61-
npm config list
62-
echo "Publishing packages as $(npm whoami)"
6361
npm run publish

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"compile-exec": "npm run evergreen-release compile",
3939
"compile-all": "npm run compile-compass && npm run compile-exec",
4040
"evergreen-release": "cd packages/build && npm run evergreen-release --",
41-
"release": "cd packages/build && npm run release --",
4241
"report-missing-help": "npm run report-missing-help --workspace @mongosh/shell-api",
4342
"report-supported-api": "npm run report-supported-api --workspace @mongosh/shell-api",
4443
"post-process-nyc": "ts-node scripts/nyc/post-process-nyc-output.ts",

packages/build/README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,11 @@ Execute the following steps to publish a new release:
2525

2626
1. Ensure there is a Jira _Release_ ticket in the [`MONGOSH` project](https://jira.mongodb.org/projects/MONGOSH) for the new release and move it to _In Progress_.
2727
2. Verify that the Jira tickets you expect to be released are correctly mapped to the _Release_ ticket. Add any additional required documentation to the release ticket.
28-
3. Trigger the draft release by running:
29-
```
30-
npm run release draft
31-
```
32-
Follow the instructions and ensure that the new draft tag to be created matches the expected release version.
33-
4. Wait for Evergreen to finish the build and complete the draft stage.\
34-
_Repeat step 3 if there are any additional changes that need to be part of the release._
28+
3. Trigger the draft release by triggering the `Prepare mongosh Release` workflow. Set the release Jira ticket and ensure that the new draft tag that gets created matches the expected release version.
29+
4. Wait for the workflow to create a PR for the release and ensure the changed files are correct. **Do not merge the PR!**
3530
5. Sync main branch of the [mongodb-js/homebrew-core](https://github.com/mongodb-js/homebrew-core/) repository with the upstream.
36-
6. Trigger the publication of the release by running:
37-
```
38-
npm run release publish
39-
```
40-
Follow the instructions and verify the inferred release version is correct.
41-
7. Wait for Evergreen to finish the publication stage.
31+
6. Trigger the `Release mongosh` workflow on the newly created `release/X.Y.Z` branch. This will start the release process and will automatically merge the PR once it is complete.
32+
7. Wait for Evergreen to finish the publication stage and automatically merge the PR.
4233
8. Close the Jira ticket for the release, post an update in the `#mongosh` Slack channel and ping the docs team.
4334

4435
### Branches and Tags

packages/build/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"check": "npm run lint && npm run depcheck",
2525
"depcheck": "depcheck",
2626
"evergreen-release": "ts-node -r ../../scripts/import-expansions.js src/index.ts",
27-
"release": "ts-node src/index.ts trigger-release",
2827
"prettier": "prettier",
2928
"bump": "ts-node src/index.ts bump",
3029
"publish": "ts-node src/index.ts publish",

packages/build/src/index.ts

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ import path from 'path';
22
import { validatePackageVariant } from './config';
33
import { downloadMongoDb } from '@mongodb-js/mongodb-downloader';
44
import { getArtifactUrl } from './evergreen';
5-
import { triggerRelease } from './local';
65
import type { ReleaseCommand } from './release';
76
import { release } from './release';
87
import type { Config, PackageVariant } from './config';
98

109
export { getArtifactUrl, downloadMongoDb };
1110

12-
const validCommands: (ReleaseCommand | 'trigger-release')[] = [
11+
const validCommands: ReleaseCommand[] = [
1312
'bump',
1413
'compile',
1514
'package',
@@ -19,12 +18,9 @@ const validCommands: (ReleaseCommand | 'trigger-release')[] = [
1918
'sign',
2019
'download-crypt-shared-library',
2120
'download-and-list-artifacts',
22-
'trigger-release',
2321
] as const;
2422

25-
const isValidCommand = (
26-
cmd: string
27-
): cmd is ReleaseCommand | 'trigger-release' =>
23+
const isValidCommand = (cmd: string): cmd is ReleaseCommand =>
2824
(validCommands as string[]).includes(cmd);
2925

3026
if (require.main === module) {
@@ -38,31 +34,27 @@ if (require.main === module) {
3834
);
3935
}
4036

41-
if (command === 'trigger-release') {
42-
await triggerRelease(process.argv.slice(3));
43-
} else {
44-
const config: Config = require(path.join(
45-
__dirname,
46-
'..',
47-
'..',
48-
'..',
49-
'config',
50-
'build.conf.js'
51-
));
37+
const config: Config = require(path.join(
38+
__dirname,
39+
'..',
40+
'..',
41+
'..',
42+
'config',
43+
'build.conf.js'
44+
));
5245

53-
const cliBuildVariant = process.argv
54-
.map((arg) => /^--build-variant=(.+)$/.exec(arg))
55-
.filter(Boolean)[0];
56-
if (cliBuildVariant) {
57-
config.packageVariant = cliBuildVariant[1] as PackageVariant;
58-
validatePackageVariant(config.packageVariant);
59-
}
46+
const cliBuildVariant = process.argv
47+
.map((arg) => /^--build-variant=(.+)$/.exec(arg))
48+
.filter(Boolean)[0];
49+
if (cliBuildVariant) {
50+
config.packageVariant = cliBuildVariant[1] as PackageVariant;
51+
validatePackageVariant(config.packageVariant);
52+
}
6053

61-
config.isDryRun ||= process.argv.includes('--dry-run');
62-
config.useAuxiliaryPackagesOnly ||= process.argv.includes('--auxiliary');
54+
config.isDryRun ||= process.argv.includes('--dry-run');
55+
config.useAuxiliaryPackagesOnly ||= process.argv.includes('--auxiliary');
6356

64-
await release(command, config);
65-
}
57+
await release(command, config);
6658
})().then(
6759
() => process.exit(0),
6860
(err) =>

packages/build/src/local/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/build/src/local/trigger-release-draft.spec.ts

Lines changed: 0 additions & 256 deletions
This file was deleted.

0 commit comments

Comments
 (0)