Skip to content

Commit

Permalink
Exclude dev sections from README in vsix (#2339)
Browse files Browse the repository at this point in the history
  • Loading branch information
ejizba committed Aug 25, 2020
1 parent fa19edf commit 60e9016
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .azure-pipelines/common/publish-vsix.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
steps:
- task: Npm@1
displayName: 'cleanReadme'
inputs:
command: custom
customCommand: run cleanReadme

- task: Npm@1
displayName: 'Package'
inputs:
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Azure Functions for Visual Studio Code (Preview)

<!-- region exclude-from-marketplace -->

[![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)

<!-- endregion exclude-from-marketplace -->

Use the Azure Functions extension to quickly create, debug, manage, and deploy serverless apps directly from VS Code. Check out the [Azure serverless community library](https://aka.ms/AA4ul9b) to view sample projects.

**Visit the [wiki](https://github.com/Microsoft/vscode-azurefunctions/wiki) for more information about Azure Functions and how to use the advanced features of this extension.**
Expand Down Expand Up @@ -67,6 +71,8 @@ This extension integrates with the [Azure Functions Core Tools](https://docs.mic
> TIP: Your url should look like this: `https://<function app name>.azurewebsites.net/api/HttpTrigger1?name=world`
1. A response of "Hello world" is returned in the browser and you know your function worked!

<!-- region exclude-from-marketplace -->

## Contributing

There are a couple of ways you can contribute to this repo:
Expand All @@ -88,6 +94,8 @@ Before we can accept your pull request you will need to sign a **Contribution Li

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

<!-- endregion exclude-from-marketplace -->

## Telemetry

VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](https://go.microsoft.com/fwlink/?LinkID=528096&clcid=0x409) to learn more. If you don’t wish to send usage data to Microsoft, you can set the `telemetry.enableTelemetry` setting to `false`. Learn more in our [FAQ](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting).
Expand Down
8 changes: 8 additions & 0 deletions gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ async function gulp_installPythonExtension() {
return gulp_installVSCodeExtension('ms-python', 'python');
}

async function cleanReadme() {
const readmePath: string = path.join(__dirname, 'README.md');
let data: string = (await fse.readFile(readmePath)).toString();
data = data.replace(/<!-- region exclude-from-marketplace -->.*?<!-- endregion exclude-from-marketplace -->/gis, '');
await fse.writeFile(readmePath, data);
}

exports['webpack-dev'] = gulp.series(prepareForWebpack, () => gulp_webpack('development'));
exports['webpack-prod'] = gulp.series(prepareForWebpack, () => gulp_webpack('production'));
exports.preTest = gulp.series(gulp_installAzureAccount, gulp_installPythonExtension, getFuncLink, installFuncCli);
exports.cleanReadme = cleanReadme;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,7 @@
"vscode:prepublish": "npm run webpack-prod",
"build": "tsc",
"compile": "tsc -watch",
"cleanReadme": "gulp cleanReadme",
"package": "vsce package",
"lint": "tslint --project tsconfig.json -t verbose",
"lint-fix": "tslint --project tsconfig.json -t verbose --fix",
Expand Down

0 comments on commit 60e9016

Please sign in to comment.