Trims commitId

pull/3540/head
Henning Dieterichs 2 years ago
parent beed7d171a
commit f9c53f16a5
No known key found for this signature in database
GPG Key ID: 771381EFFDB9EC06

@ -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…
Cancel
Save