@@ -39,33 +39,53 @@ export default class MongoBinaryDownloadUrl {
3939 }
4040
4141 async getArchiveName ( ) : Promise < string > {
42+ switch ( this . platform ) {
43+ case 'osx' :
44+ return this . getArchiveNameOsx ( ) ;
45+ case 'win32' :
46+ return this . getArchiveNameWin ( ) ;
47+ case 'linux' :
48+ default :
49+ return this . getArchiveNameLinux ( ) ;
50+ }
51+ }
52+
53+ async getArchiveNameWin ( ) : Promise < string > {
4254 let name = `mongodb-${ this . platform } ` ;
55+ name += `-${ this . arch } ` ;
56+ name += '-2008plus-ssl' ;
57+ name += `-${ this . version } .zip` ;
58+ return name ;
59+ }
4360
61+ async getArchiveNameOsx ( ) : Promise < string > {
62+ let name = `mongodb-osx` ;
4463 if ( this . ssl ) {
4564 name += '-ssl' ;
4665 }
66+ name += `-${ this . arch } ` ;
67+ name += `-${ this . version } .tgz` ;
68+ return name ;
69+ }
4770
71+ async getArchiveNameLinux ( ) : Promise < string > {
72+ let name = `mongodb-linux` ;
4873 name += `-${ this . arch } ` ;
4974
5075 let osString ;
51- if ( this . platform === 'linux' && this . arch !== 'i686' ) {
76+ if ( this . arch !== 'i686' ) {
5277 if ( ! this . os ) this . os = await this . getos ( ) ;
5378 osString = this . getLinuxOSVersionString ( this . os ) ;
5479 }
55-
5680 if ( osString ) {
5781 name += `-${ osString } ` ;
5882 }
5983
60- name += `-${ this . version } .${ this . getArchiveType ( ) } ` ;
84+ name += `-${ this . version } .tgz ` ;
6185
6286 return name ;
6387 }
6488
65- getArchiveType ( ) : string {
66- return this . platform === 'win32' ? 'zip' : 'tgz' ;
67- }
68-
6989 async getos ( ) : Promise < OS > {
7090 return new Promise ( ( resolve , reject ) => {
7191 getos ( ( e : any , os : any ) => {
0 commit comments