mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 07:00:11 +01:00
Merge pull request #3540 from microsoft/hediet/agreed-turtle
Trims commitId
This commit is contained in:
commit
30f0acb38b
4 changed files with 10 additions and 11 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import { mkdir, rm } from 'fs/promises';
|
||||
import { join, resolve } from 'path';
|
||||
import { group, gitShallowClone, run, writeJsonFile, getNightlyVersion } from '../lib';
|
||||
import { PackageJson } from './types';
|
||||
import { PackageJson, group, gitShallowClone, run, writeJsonFile, getNightlyVersion } from '../lib';
|
||||
|
||||
const selfPath = __dirname;
|
||||
const rootPath = join(selfPath, '..', '..');
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { readFile } from 'fs/promises';
|
||||
import { join, resolve } from 'path';
|
||||
import { getNightlyVersion, group, run, writeJsonFile } from '../lib';
|
||||
import { PackageJson } from './types';
|
||||
import { PackageJson, getNightlyVersion, group, run, writeJsonFile } from '../lib';
|
||||
|
||||
const selfPath = __dirname;
|
||||
const rootPath = join(selfPath, '..', '..');
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
export interface PackageJson {
|
||||
version: string;
|
||||
vscodeRef?: string;
|
||||
vscodeCommitId?: string;
|
||||
devDependencies: Record<string, string>;
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ export async function gitShallowClone(
|
|||
await run(`git remote add origin ${repositoryUrl}`, options);
|
||||
await run(`git fetch --depth 1 origin ${ref}`, options);
|
||||
await run(`git checkout ${ref}`, options);
|
||||
const commitId = await runGetOutput('git rev-parse HEAD', options);
|
||||
const commitId = (await runGetOutput('git rev-parse HEAD', options)).trim();
|
||||
return { commitId };
|
||||
}
|
||||
|
||||
|
|
@ -77,3 +77,10 @@ export function getNightlyVersion(version: string): string {
|
|||
const dd = String(date.getUTCDate()).padStart(2, '0');
|
||||
return `0.${minor + 1}.0-dev.${yyyy}${mm}${dd}`;
|
||||
}
|
||||
|
||||
export interface PackageJson {
|
||||
version: string;
|
||||
vscodeRef?: string;
|
||||
vscodeCommitId?: string;
|
||||
devDependencies: Record<string, string>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue