Skip to content

Commit f0669e0

Browse files
committed
Zip on OSX for notarization
1 parent b808607 commit f0669e0

File tree

6 files changed

+7
-210
lines changed

6 files changed

+7
-210
lines changed

packages/build/src/download-center.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('download center module', () => {
1212
});
1313

1414
it('returns the string with the macos version injected', () => {
15-
expect(config).to.include('mongosh-1.2.2-darwin.tgz');
15+
expect(config).to.include('mongosh-1.2.2-darwin.zip');
1616
});
1717

1818
it('returns the string with the linux version injected', () => {

packages/build/src/download-center.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const CONFIG = `
3333
"arch": "x64",
3434
"os": "darwin",
3535
"name": "MacOS 64-bit (10.10+)",
36-
"download_link": "https://downloads.mongodb.com/compass/mongosh-{{version}}-darwin.tgz"
36+
"download_link": "https://downloads.mongodb.com/compass/mongosh-{{version}}-darwin.zip"
3737
},
3838
{
3939
"arch": "x64",

packages/build/src/release.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import S3 from 'aws-sdk/clients/s3';
1717
*/
1818
const release = async(config: Config) => {
1919
const platform = os.platform();
20-
// console.log('mongosh: releasing with config:', config);
2120

2221
const octokit = new Octokit({
2322
auth: config.githubToken,

packages/build/src/zip.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('zip module', () => {
2121
context('when the platform is macos', () => {
2222
it('returns the tarball name', () => {
2323
expect(zipPath('', Platform.MacOs, '1.0.0')).
24-
to.equal('mongosh-1.0.0-darwin.tgz');
24+
to.equal('mongosh-1.0.0-darwin.zip');
2525
});
2626
});
2727

packages/build/src/zip.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Platform from './platform';
1313
* @returns {string} The path.
1414
*/
1515
const zipPath = (outputDir: string, platform: string, version: string): string => {
16-
const ext = (platform === Platform.Windows) ? 'zip' : 'tgz';
16+
const ext = (platform === Platform.Linux) ? 'tgz' : 'zip';
1717
return path.join(outputDir, `mongosh-${version}-${platform}.${ext}`);
1818
};
1919

@@ -64,10 +64,10 @@ const zipWindows = async(input: string, filename: string) => {
6464
const zip = async(input: string, outputDir: string, platform: string, version: string): Promise<string> => {
6565
const filename = zipPath(outputDir, platform, version);
6666
console.log('mongosh: zipping:', filename);
67-
if (platform === Platform.Windows) {
68-
zipWindows(input, filename);
67+
if (platform === Platform.Linux) {
68+
await zipPosix(outputDir, filename);
6969
} else {
70-
zipPosix(outputDir, filename);
70+
await zipWindows(input, filename);
7171
}
7272
return filename;
7373
};

packages/mapper/package-lock.json

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

0 commit comments

Comments
 (0)