@@ -32,16 +32,6 @@ const argv = yargs(hideBin(process.argv))
3232 type : 'string' ,
3333 default : process . env . EVERGREEN_BUCKET_KEY_PREFIX ,
3434 } )
35- . option ( 'version' , {
36- type : 'string' ,
37- // For dev versions we need this from evergreen. For beta or stable (or by
38- // default, ie. when testing a locally packaged app) we get it from the
39- // package.json
40- // NOTE: DEV_VERSION_IDENTIFIER might be a blank string which would be invalid
41- default : process . env . DEV_VERSION_IDENTIFIER || undefined ,
42- description :
43- 'Will be read from packages/compass/package.json if not specified' ,
44- } )
4535 . option ( 'platform' , {
4636 type : 'string' ,
4737 choices : [ 'win32' , 'darwin' , 'linux' ] ,
@@ -89,7 +79,6 @@ const argv = yargs(hideBin(process.argv))
8979type SmokeTestsContext = {
9080 bucketName ?: string ;
9181 bucketKeyPrefix ?: string ;
92- version ?: string ;
9382 platform : 'win32' | 'darwin' | 'linux' ;
9483 arch : 'x64' | 'arm64' ;
9584 package :
@@ -113,15 +102,6 @@ async function readJson<T extends object>(...segments: string[]): Promise<T> {
113102 return result as T ;
114103}
115104
116- async function readPackageVersion ( packagePath : string ) {
117- const pkg = await readJson ( packagePath , 'package.json' ) ;
118- assert (
119- 'version' in pkg && typeof pkg . version === 'string' ,
120- 'Expected a package version'
121- ) ;
122- return pkg . version ;
123- }
124-
125105async function run ( ) {
126106 const parsedArgs = argv . parseSync ( ) ;
127107
@@ -133,23 +113,19 @@ async function run() {
133113 'skipDownload' ,
134114 'bucketName' ,
135115 'bucketKeyPrefix' ,
136- 'version' ,
137116 'platform' ,
138117 'arch' ,
139118 'package' ,
140119 ] )
141120 ) ;
142121
143122 const compassDir = path . resolve ( __dirname , '..' , '..' , 'packages' , 'compass' ) ;
144- // use the specified DEV_VERSION_IDENTIFIER if set or load version from packages/compass/package.json
145- const version = context . version ?? ( await readPackageVersion ( compassDir ) ) ;
146123 const outPath = path . resolve ( __dirname , 'hadron-build-info.json' ) ;
147124
148125 // build-info
149126 const infoArgs = {
150127 format : 'json' ,
151128 dir : compassDir ,
152- version,
153129 platform : context . platform ,
154130 arch : context . arch ,
155131 out : outPath ,
0 commit comments