* Change badge on readme
* Add "ComponentGovernance" task. Rather than manually register every third party tool we use, It automatically does it for us.
* Simplify publish-vsix
* Clean up "install-azure-account"
This commit is contained in:
Eric Jizba 2018-11-01 11:17:17 -07:00 коммит произвёл GitHub
Родитель b61db77409
Коммит 78d435c0d4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 21 добавлений и 18 удалений

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

@ -4,3 +4,6 @@ steps:
inputs:
command: custom
customCommand: run lint
- task: ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'

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

@ -5,13 +5,14 @@ steps:
command: custom
customCommand: run package
- task: Gulp@0
displayName: 'Set vsixName'
- task: CopyFiles@2
displayName: 'Copy vsix to staging directory'
inputs:
targets: 'set-vsix-name'
Contents: '**/*.vsix'
TargetFolder: '$(build.artifactstagingdirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish artifacts: vsix'
inputs:
PathtoPublish: '$(vsixName)'
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: vsix

5
.vscode/tasks.json поставляемый
Просмотреть файл

@ -17,10 +17,7 @@
{
"type": "npm",
"script": "lint",
"problemMatcher": {
"base": "$tslint5",
"fileLocation": "absolute"
}
"problemMatcher": "$tslint5"
}
]
}

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

@ -1,6 +1,6 @@
# Azure Functions for Visual Studio Code (Preview)
[![Version](https://vsmarketplacebadge.apphb.com/version/ms-azuretools.vscode-azurefunctions.svg)](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions) [![Installs](https://vsmarketplacebadge.apphb.com/installs-short/ms-azuretools.vscode-azurefunctions.svg)](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions) [![Build Status](https://travis-ci.org/Microsoft/vscode-azurefunctions.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-azurefunctions) [![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/Microsoft/vscode-azurefunctions/blob/master/LICENSE.md)
[![Version](https://vsmarketplacebadge.apphb.com/version/ms-azuretools.vscode-azurefunctions.svg)](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions) [![Installs](https://vsmarketplacebadge.apphb.com/installs-short/ms-azuretools.vscode-azurefunctions.svg)](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions) [![Build Status](https://dev.azure.com/ms-azuretools/AzCode/_apis/build/status/vscode-azurefunctions)](https://dev.azure.com/ms-azuretools/AzCode/_build/latest?definitionId=2) [![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/Microsoft/vscode-azurefunctions/blob/master/LICENSE.md)
Create, debug, manage, and deploy Azure Functions directly from VS Code. Check
out this [deployment tutorial](https://code.visualstudio.com/tutorials/functions-extension/getting-started)

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

@ -10,15 +10,10 @@ const path = require('path');
const os = require('os');
const fse = require('fs-extra');
const cp = require('child_process');
const packageJson = require('./package.json');
const request = require('request');
const chmod = require('gulp-chmod');
const filter = require('gulp-filter');
gulp.task('set-vsix-name', () => {
const vsixName = `${packageJson.name}-${packageJson.version}.vsix`;
console.log(`##vso[task.setvariable variable=vsixName]${vsixName}`);
});
const glob = require('glob');
gulp.task('test', ['install-azure-account', 'install-func-cli'], (cb) => {
const env = process.env;
@ -32,10 +27,15 @@ gulp.task('test', ['install-azure-account', 'install-func-cli'], (cb) => {
});
});
/**
* Installs the azure account extension before running tests (otherwise our extension would fail to activate)
* NOTE: The version isn't super important since we don't actually use the account extension in tests
*/
gulp.task('install-azure-account', () => {
const version = '0.3.0';
const version = '0.4.3';
const extensionPath = path.join(os.homedir(), `.vscode/extensions/ms-vscode.azure-account-${version}`);
if (!fse.pathExistsSync(extensionPath)) {
const existingExtensions = glob.sync(extensionPath.replace(version, '*'));
if (existingExtensions.length === 0) {
return download(`http://ms-vscode.gallery.vsassets.io/_apis/public/gallery/publisher/ms-vscode/extension/azure-account/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage`)
.pipe(decompress({
filter: file => file.path.startsWith('extension/'),

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

@ -687,7 +687,8 @@
"compile": "tsc -watch -p ./",
"package": "vsce package",
"lint": "tslint --project tsconfig.json -e src/*.d.ts -t verbose",
"postinstall": "node ./node_modules/vscode/bin/install"
"postinstall": "node ./node_modules/vscode/bin/install",
"test": "gulp test"
},
"devDependencies": {
"@types/clipboardy": "^1.1.0",
@ -703,6 +704,7 @@
"@types/xml2js": "^0.4.2",
"@types/xregexp": "^3.0.29",
"azure-arm-resource": "^3.0.0-preview",
"glob": "^7.1.3",
"gulp": "^3.9.1",
"gulp-chmod": "^2.0.0",
"gulp-decompress": "^2.0.1",