This commit is contained in:
Eric Jizba 2018-03-13 22:45:44 +00:00 коммит произвёл GitHub
Родитель 16249c5ba1
Коммит e0d41f175b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 52 добавлений и 2 удалений

Просмотреть файл

@ -16,7 +16,8 @@ install:
- npm install
script:
- npm run vscode:prepublish
- gulp package
- gulp upload-vsix
- npm test
notifications:

46
gulpfile.js Normal file
Просмотреть файл

@ -0,0 +1,46 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
const gulp = require('gulp');
const path = require('path');
const azureStorage = require('azure-storage');
const vsce = require('vsce');
const packageJson = require('./package.json');
gulp.task('package', async () => {
await vsce.createVSIX();
});
gulp.task('upload-vsix', (callback) => {
if (process.env.TRAVIS_PULL_REQUEST_BRANCH) {
console.log('Skipping upload-vsix for PR build.');
} else {
const containerName = packageJson.name;
const vsixName = `${packageJson.name}-${packageJson.version}.vsix`;
const blobPath = path.join(process.env.TRAVIS_BRANCH, process.env.TRAVIS_BUILD_NUMBER, vsixName);
const blobService = azureStorage.createBlobService(process.env.STORAGE_NAME, process.env.STORAGE_KEY);
blobService.createContainerIfNotExists(containerName, { publicAccessLevel: "blob" }, (err) => {
if (err) {
callback(err);
} else {
blobService.createBlockBlobFromLocalFile(containerName, blobPath, vsixName, (err) => {
if (err) {
callback(err);
} else {
const brightYellowFormatting = '\x1b[33m\x1b[1m%s\x1b[0m';
const brightWhiteFormatting = '\x1b[1m%s\x1b[0m';
console.log();
console.log(brightYellowFormatting, '================================================ vsix url ================================================');
console.log();
console.log(brightWhiteFormatting, blobService.getUrl(containerName, blobPath));
console.log();
console.log(brightYellowFormatting, '==========================================================================================================');
console.log();
}
});
}
});
}
});

Просмотреть файл

@ -706,9 +706,12 @@
"@types/socket.io-client": "^1.4.27",
"@types/d3": "5.0.0",
"antlr4ts-cli": "^0.4.0-alpha.4",
"azure-storage": "^2.8.1",
"gulp": "^3.9.1",
"mocha": "^2.3.3",
"typescript": "^2.0.3",
"vscode": "^1.0.0"
"vscode": "^1.0.0",
"vsce": "^1.37.5"
},
"dependencies": {
"antlr4ts": "^0.4.0-alpha.4",