Skip to content

Commit 92bdb85

Browse files
committed
wip
1 parent 1e72a54 commit 92bdb85

File tree

2 files changed

+34
-6
lines changed

2 files changed

+34
-6
lines changed

.evergreen/preinstall.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ echo "NPM_VERSION: $NPM_VERSION"
1212
echo "APPDATA: $APPDATA"
1313
echo "PATH: $PATH"
1414

15+
# these are super useful if you want to run the smoke tests locally
16+
echo "DEV_VERSION_IDENTIFIER: $DEV_VERSION_IDENTIFIER"
17+
echo "EVERGREEN_BUCKET_NAME: $EVERGREEN_BUCKET_NAME"
18+
echo "EVERGREEN_BUCKET_KEY_PREFIX: $EVERGREEN_BUCKET_KEY_PREFIX"
19+
1520
echo "IS_OSX: $IS_OSX"
1621
echo "IS_LINUX: $IS_LINUX"
1722
echo "IS_WINDOWS: $IS_WINDOWS"

packages/compass-e2e-tests/smoke-test.ts

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env npx ts-node
2-
import yargs from 'yargs';
2+
import yargs, { boolean } from 'yargs';
33
import type { Argv } from 'yargs';
44
import { hideBin } from 'yargs/helpers';
55
import { promises as fs } from 'fs';
@@ -18,7 +18,7 @@ const argv = yargs(hideBin(process.argv))
1818
// Dor dev versions we need this from evergreen. For beta or stable we get
1919
// it from the package.json
2020
if (process.env.DEV_VERSION_IDENTIFIER) {
21-
argv.version = process.env.DEV_VERSION_IDENTIFIER;
21+
argv.devVersion = process.env.DEV_VERSION_IDENTIFIER;
2222
}
2323

2424
argv.isWindows = process.env.IS_WINDOWS === 'true';
@@ -33,6 +33,27 @@ const argv = yargs(hideBin(process.argv))
3333
.detectLocale(false)
3434
.version(false)
3535
.strict()
36+
.option('bucketName', {
37+
type: 'string',
38+
})
39+
.option('bucketKeyPrefix', {
40+
type: 'string',
41+
})
42+
.option('devVersion', {
43+
type: 'string',
44+
})
45+
.option('isWindows', {
46+
type: 'boolean',
47+
})
48+
.option('isOSX', {
49+
type: 'boolean',
50+
})
51+
.option('isRHEL', {
52+
type: 'boolean',
53+
})
54+
.option('isUbuntu', {
55+
type: 'boolean',
56+
})
3657
.option('arch', {
3758
type: 'string',
3859
choices: ['x64', 'arm64'],
@@ -88,10 +109,12 @@ async function run() {
88109
console.log('context', context);
89110

90111
const compassDir = path.resolve(__dirname, '..', '..', 'packages', 'compass');
91-
// TODO: load version from either DEV_VERSION_IDENTIFIER if set or version in packages/compass/package.json
92-
const version = JSON.parse(
93-
await fs.readFile(path.join(compassDir, 'package.json'), 'utf8')
94-
).version as string;
112+
// use the specified DEV_VERSION_IDENTIFIER if set or load version from packages/compass/package.json
113+
const version = context.devVersion
114+
? context.devVersion
115+
: (JSON.parse(
116+
await fs.readFile(path.join(compassDir, 'package.json'), 'utf8')
117+
).version as string);
95118
const platform = platformFromContext(context);
96119
const outPath = path.resolve(__dirname, 'hadron-build-info.json');
97120

0 commit comments

Comments
 (0)