mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
cli: get builds in order
This commit is contained in:
@@ -14,7 +14,8 @@ import * as _rimraf from 'rimraf';
|
||||
import * as VinylFile from 'vinyl';
|
||||
import { ThroughStream } from 'through';
|
||||
import * as sm from 'source-map';
|
||||
import * as git from './git';
|
||||
|
||||
export { getVersion } from './getVersion';
|
||||
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
|
||||
@@ -317,16 +318,6 @@ export function ensureDir(dirPath: string): void {
|
||||
fs.mkdirSync(dirPath);
|
||||
}
|
||||
|
||||
export function getVersion(root: string): string | undefined {
|
||||
let version = process.env['VSCODE_DISTRO_COMMIT'] || process.env['BUILD_SOURCEVERSION'];
|
||||
|
||||
if (!version || !/^[0-9a-f]{40}$/i.test(version.trim())) {
|
||||
version = git.getVersion(root);
|
||||
}
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
export function rebase(count: number): NodeJS.ReadWriteStream {
|
||||
return rename(f => {
|
||||
const parts = f.dirname ? f.dirname.split(/[\/\\]/) : [];
|
||||
|
||||
Reference in New Issue
Block a user