Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/bump-auxiliary-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ jobs:
run: |
npm run bump-auxiliary
git add .
git commit --no-allow-empty -m "chore(release): bump auxiliary packages" || true
git commit --no-allow-empty -m "chore(release): bump packages for auxiliary release" || true

- name: Create Pull Request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # 7.0.5
with:
token: ${{ steps.app-token.outputs.token }}
commit-message: "chore(release): bump auxiliary packages"
commit-message: "chore(release): bump packages for auxiliary release"
branch: ci/bump-auxiliary-packages
title: "chore(release): bump auxiliary packages"
title: "chore(release): bump packages for auxiliary release"
labels: no-title-validation
body: |
- Bumps auxiliary package versions. Merging will trigger a release of these packages.
2 changes: 1 addition & 1 deletion .github/workflows/publish-auxiliary-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
publish:
if: |
github.event_name == 'workflow_dispatch' ||
startsWith(github.event.head_commit.message, 'chore(release): bump auxiliary packages')
startsWith(github.event.head_commit.message, 'chore(release): bump packages for auxiliary release')

runs-on: ubuntu-latest
environment: Production
Expand Down
23 changes: 17 additions & 6 deletions packages/build/src/npm-packages/bump.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function bumpAuxiliaryPackages() {
encoding: 'utf8',
env: {
...process.env,
LAST_BUMP_COMMIT_MESSAGE: 'chore(release): bump auxiliary packages',
LAST_BUMP_COMMIT_MESSAGE: 'chore(release): bump packages',
SKIP_BUMP_PACKAGES: [
...EXCLUDE_RELEASE_PACKAGES,
...MONGOSH_RELEASE_PACKAGES,
Expand All @@ -120,6 +120,7 @@ export function bumpAuxiliaryPackages() {
}

export function commitBumpedPackages(
{ useAuxiliaryPackagesOnly }: { useAuxiliaryPackagesOnly: boolean },
spawnSync: typeof spawnSyncFn = spawnSyncFn
) {
spawnSync('git', ['add', '.'], {
Expand All @@ -128,9 +129,19 @@ export function commitBumpedPackages(
encoding: 'utf8',
});

spawnSync('git', ['commit', '-m', 'chore(release): bump packages'], {
stdio: 'inherit',
cwd: PROJECT_ROOT,
encoding: 'utf8',
});
spawnSync(
'git',
[
'commit',
'-m',
`chore(release): bump packages for ${
useAuxiliaryPackagesOnly ? 'auxiliary' : 'mongosh'
} release`,
],
{
stdio: 'inherit',
cwd: PROJECT_ROOT,
encoding: 'utf8',
}
);
}
2 changes: 1 addition & 1 deletion packages/build/src/publish-mongosh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export async function publishMongosh(

bumpAuxiliaryPackages();
await bumpMongoshReleasePackages(releaseVersion);
commitBumpedPackages(spawnSync);
commitBumpedPackages({ useAuxiliaryPackagesOnly: false }, spawnSync);
pushTags({
useAuxiliaryPackagesOnly: false,
isDryRun: config.isDryRun || false,
Expand Down
Loading