Skip to content

Commit

Permalink
Documentation update, added typing and grouped build def description …
Browse files Browse the repository at this point in the history
…change.
  • Loading branch information
michelkaporin committed Jun 20, 2017
1 parent fd0964b commit ca7440b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,14 @@ The extension is enabled by providing the following settings (user or workspace)
}
```

It also allows to add several build definitions grouped into one status bar indicator. It could be helpful if you trigger multiple builds which overall result is success only if all builds are passing (e.g. when running multiple build definitions on the same code base cross-platform). To enable grouped build definitions, add the following configuration in addition to the one at the top:

```json
{
"vsts.definitionsGroup": "1,2,3", // IDs of build definitions to be grouped, separated with a comma
"vsts.definitionsGroupName": "My Grouped Builds", // Name of the grouped build definitions
}
```

## License
MIT, please see LICENSE for details. Copyright (c) 2016 Jeppe Andersen.
4 changes: 2 additions & 2 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ export class WorkspaceVstsSettings implements Settings {

if (definitionsGroup) {
const buildIds = definitionsGroup.split(',').map(id => parseInt(id));
let defList = [];
let defList: BuildDefinition[] = [];
buildIds.forEach(id => {
defList.push({
id: id,
name: this.definitionsGroupName,
revision: 0
revision: undefined
});
});
this.definitionsGroup = defList;
Expand Down
2 changes: 1 addition & 1 deletion src/vstsbuildstatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export class VstsBuildStatus {
if (this.settings.definitionsGroup) {
buildDefinitions.push({
label: this.settings.definitionsGroupName ? this.settings.definitionsGroupName : this.settings.definitionsGroup.map(b => b.id.toString()).join(','),
description: 'Grouped Build Definitions',
description: 'Grouped Build Definition',
ids: this.settings.definitionsGroup.map(b => b.id),
definitions: this.settings.definitionsGroup
});
Expand Down

0 comments on commit ca7440b

Please sign in to comment.