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
1 change: 1 addition & 0 deletions config/build.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ module.exports = {
applePassword: process.env.APPLE_DEV_PASSWORD,
appleAppIdentity: process.env.APPLE_APP_IDENTITY,
isCi: process.env.IS_CI === 'true',
isPatch: process.env.IS_PATCH === 'true',
platform: os.platform(),
buildVariant: process.env.BUILD_VARIANT,
repo: {
Expand Down
1 change: 1 addition & 0 deletions packages/build/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ export default interface Config {
repo: string;
};
dryRun?: boolean;
isPatch?: boolean;
}
6 changes: 6 additions & 0 deletions packages/build/src/github-repo.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ describe('GithubRepo', () => {
});

describe('shouldDoPublicRelease', () => {
it('returns false when isPatch is true', async() => {
const config = { isPatch: true };
expect(await githubRepo.shouldDoPublicRelease(config)).to.be.false;
});


it('returns false when branch is not master', async() => {
const config = { branch: 'feature' };
expect(await githubRepo.shouldDoPublicRelease(config)).to.be.false;
Expand Down
5 changes: 5 additions & 0 deletions packages/build/src/github-repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ export class GithubRepo {
* current version matches current revision.
*/
async shouldDoPublicRelease(config: Config): Promise<boolean> {
if (config.isPatch) {
console.info('mongosh: skip public release: is a patch');
return false;
}

if (config.branch !== 'master') {
console.info('mongosh: skip public release: is not master');
return false;
Expand Down
3 changes: 2 additions & 1 deletion packages/build/src/redact-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export function redactConfig(config: Config): any {
branch: config.branch,
isCi: config.isCi,
platform: config.platform,
repo: config.repo
repo: config.repo,
isPatch: config.isPatch
};
}