mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 13:55:41 +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
|
|
@ -73,14 +73,16 @@ export async function writeJsonFile(filePath: string, jsonData: unknown): Promis
|
|||
await writeFile(filePath, JSON.stringify(jsonData, null, '\t') + '\n');
|
||||
}
|
||||
|
||||
export function getNightlyVersion(version: string): string {
|
||||
export function getNightlyVersion(version: string, prerelease: string | undefined): string {
|
||||
const pieces = version.split('.');
|
||||
const minor = parseInt(pieces[1], 10);
|
||||
const date = new Date();
|
||||
const yyyy = date.getUTCFullYear();
|
||||
const mm = String(date.getUTCMonth() + 1).padStart(2, '0');
|
||||
const dd = String(date.getUTCDate()).padStart(2, '0');
|
||||
return `0.${minor + 1}.0-dev.${yyyy}${mm}${dd}`;
|
||||
|
||||
prerelease = prerelease || `dev.${yyyy}${mm}${dd}`;
|
||||
return `0.${minor + 1}.0-${prerelease}`;
|
||||
}
|
||||
|
||||
export interface PackageJson {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue