Trims commitId

This commit is contained in:
Henning Dieterichs 2023-02-09 18:42:15 +01:00
parent beed7d171a
commit f9c53f16a5
No known key found for this signature in database
GPG key ID: 771381EFFDB9EC06
4 changed files with 10 additions and 11 deletions

View file

@ -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>;
}