mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
Refactor smoke UI automation into separate package
This commit is contained in:
19
test/automation/tools/copy-package-version.js
Normal file
19
test/automation/tools/copy-package-version.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const packageDir = path.dirname(__dirname);
|
||||
const root = path.dirname(path.dirname(path.dirname(__dirname)));
|
||||
|
||||
const rootPackageJsonFile = path.join(root, 'package.json');
|
||||
const thisPackageJsonFile = path.join(packageDir, 'package.json');
|
||||
const rootPackageJson = JSON.parse(fs.readFileSync(rootPackageJsonFile, 'utf8'));
|
||||
const thisPackageJson = JSON.parse(fs.readFileSync(thisPackageJsonFile, 'utf8'));
|
||||
|
||||
thisPackageJson.version = rootPackageJson.version;
|
||||
|
||||
fs.writeFileSync(thisPackageJsonFile, JSON.stringify(thisPackageJson, null, ' '));
|
||||
Reference in New Issue
Block a user