mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 08:10:11 +01:00
Allows for manual nightly builds.
This commit is contained in:
parent
c84c0cb8f9
commit
74470a5fb2
5 changed files with 31 additions and 5 deletions
6
scripts/ci/env.ts
Normal file
6
scripts/ci/env.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export function getEnv(): {
|
||||
VSCODE_REF: string | undefined;
|
||||
PRERELEASE_VERSION: string | undefined;
|
||||
} {
|
||||
return process.env as any;
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
import { mkdir, rm } from 'fs/promises';
|
||||
import { join, resolve } from 'path';
|
||||
import { PackageJson, group, gitShallowClone, run, writeJsonFile, getNightlyVersion } from '../lib';
|
||||
import { getEnv } from './env';
|
||||
|
||||
const selfPath = __dirname;
|
||||
const rootPath = join(selfPath, '..', '..');
|
||||
|
|
@ -21,8 +22,8 @@ async function prepareMonacoEditorCoreReleaseStableOrNightly() {
|
|||
version = monacoEditorPackageJson.version;
|
||||
ref = monacoEditorPackageJson.vscodeRef;
|
||||
} else if (arg === 'nightly') {
|
||||
version = getNightlyVersion(monacoEditorPackageJson.version);
|
||||
ref = 'main';
|
||||
version = getNightlyVersion(monacoEditorPackageJson.version, getEnv().PRERELEASE_VERSION);
|
||||
ref = getEnv().VSCODE_REF || 'main';
|
||||
} else {
|
||||
throw new Error('Invalid argument');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { readFile } from 'fs/promises';
|
||||
import { join, resolve } from 'path';
|
||||
import { PackageJson, getNightlyVersion, group, run, writeJsonFile, gitCommitId } from '../lib';
|
||||
import { getEnv } from './env';
|
||||
|
||||
const selfPath = __dirname;
|
||||
const rootPath = join(selfPath, '..', '..');
|
||||
|
|
@ -23,7 +24,7 @@ async function prepareMonacoEditorReleaseStableOrNightly() {
|
|||
if (arg === 'stable') {
|
||||
version = monacoEditorPackageJson.version;
|
||||
} else if (arg === 'nightly') {
|
||||
version = getNightlyVersion(monacoEditorPackageJson.version);
|
||||
version = getNightlyVersion(monacoEditorPackageJson.version, getEnv().PRERELEASE_VERSION);
|
||||
} else {
|
||||
throw new Error('Invalid argument');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue