Skip to content

Commit

Permalink
ensure compatibility with old bump
Browse files Browse the repository at this point in the history
  • Loading branch information
gagik committed Dec 19, 2024
1 parent 4c97468 commit 8c9c214
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
13 changes: 13 additions & 0 deletions packages/build/src/npm-packages/bump.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { spawnSync } from '../helpers';
import { PROJECT_ROOT } from './constants';

export function bumpNpmPackages() {
spawnSync('npm', ['run', 'bump-packages'], {
stdio: 'inherit',
cwd: PROJECT_ROOT,
encoding: 'utf8',
env: {
...process.env,
},
});
}
1 change: 1 addition & 0 deletions packages/build/src/npm-packages/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { publishNpmPackages } from './publish';
export { bumpNpmPackages } from './bump';
8 changes: 7 additions & 1 deletion packages/build/src/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from './evergreen';
import { GithubRepo } from '@mongodb-js/devtools-github-repo';
import { publishToHomebrew } from './homebrew';
import { publishNpmPackages } from './npm-packages';
import { bumpNpmPackages, publishNpmPackages } from './npm-packages';
import { runPackage } from './packaging';
import { runDraft } from './run-draft';
import { runPublish } from './run-publish';
Expand Down Expand Up @@ -54,6 +54,12 @@ export async function release(
redactConfig(config)
);

if (command === 'bump') {
// updates the version of internal packages to reflect the tagged one
bumpNpmPackages();
return;
}

const octokit = new Octokit({
auth: config.githubToken,
});
Expand Down

0 comments on commit 8c9c214

Please sign in to comment.