Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Feature/vs2017 rc (#13)
Browse files Browse the repository at this point in the history
* Prepping for VS2017RC compat; updating based on VSTS guidance

* Updating based on new guidance for extension structuring

* Followung up on some feedback from @jessehouwing

* Adding TypeScript task template, Pester tests, and scoping projects to PowerShell and TypeScript

* Updating structure for PS task lib; updating release notes
  • Loading branch information
jgarverick committed Jan 27, 2017
1 parent 5e3e28a commit 6adc72d
Show file tree
Hide file tree
Showing 72 changed files with 5,642 additions and 6,146 deletions.
8 changes: 4 additions & 4 deletions BuildReleaseTaskItem/BuildReleaseTask.vstemplate
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<VSTemplate Version="3.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005"
xmlns:sdk="http://schemas.microsoft.com/developer/vstemplate-sdkextension/2010">
<TemplateData>
<Name>VSTS Custom Build/Release Task</Name>
<Description>Creates a new custom task for use with Visual Studio Team Services. Can be used for build, release or both.</Description>
<Name>VSTS Custom Build/Release Task (PowerShell)</Name>
<Description>Creates a new custom PowerShell task for use with Visual Studio Team Services. Can be used for build, release or both.</Description>
<Icon>VSOE.ico</Icon>
<TemplateID>ac994f77-fed5-4853-98f6-11c19c59c741</TemplateID>
<ProjectType>CSharp</ProjectType>
<ProjectType>PowerShell</ProjectType>
<AppliesTo>Web,JavaScript,TypeScript</AppliesTo>
<RequiredFrameworkVersion>2.0</RequiredFrameworkVersion>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
<DefaultName>BuildReleaseCustomTask</DefaultName>
<DefaultName>BuildReleaseCustomTaskPS</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<LocationField>Enabled</LocationField>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
Expand Down
5 changes: 3 additions & 2 deletions BuildReleaseTaskItem/BuildReleaseTaskItem.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>14.0</OldToolsVersion>
<UpgradeBackupLocation />
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand Down
80 changes: 80 additions & 0 deletions BuildReleaseTaskItemTS/BuildReleaseTaskItemTS.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{F3E37F69-8664-48A3-B1A3-145148487785}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BuildReleaseTaskItemTS</RootNamespace>
<AssemblyName>BuildReleaseTaskItemTS</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GeneratePkgDefFile>false</GeneratePkgDefFile>
<IncludeAssemblyInVSIXContainer>false</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>false</IncludeDebugSymbolsInLocalVSIXDeployment>
<CreateVsixContainer>false</CreateVsixContainer>
<DeployExtension>false</DeployExtension>
<DeployVSTemplates>false</DeployVSTemplates>
<CopyVsixManifestToOutput>false</CopyVsixManifestToOutput>
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.CoreUtility">
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<VSTemplate Include="BuildReleaseTaskItemTS.vstemplate" />
</ItemGroup>
<ItemGroup>
<Content Include="icon.png" />
<Content Include="VSOE.ico" />
</ItemGroup>
<ItemGroup>
<None Include="readme.md" />
<None Include="task.json" />
<TypeScriptCompile Include="task.ts" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
22 changes: 22 additions & 0 deletions BuildReleaseTaskItemTS/BuildReleaseTaskItemTS.vstemplate
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<VSTemplate Version="3.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" xmlns:sdk="http://schemas.microsoft.com/developer/vstemplate-sdkextension/2010">
<TemplateData>
<Name>VSTS Custom Build/Release Task (TypeScript)</Name>
<Description>Creates a new custom TypeScript task for use with Visual Studio Team Services. Can be used for build, release or both</Description>
<Icon>VSOE.ico</Icon>
<TemplateID>9e1430e7-8d12-4592-af2f-9746b702e35e</TemplateID>
<ProjectType>TypeScript</ProjectType>
<AppliesTo>Web,JavaScript</AppliesTo>
<RequiredFrameworkVersion>2.0</RequiredFrameworkVersion>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
<DefaultName>BuildReleaseCustomTaskTS</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<LocationField>Enabled</LocationField>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
</TemplateData>
<TemplateContent>
<ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$\$fileinputname$.ts">task.ts</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$\task.json">task.json</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$\icon.png">icon.png</ProjectItem>
</TemplateContent>
</VSTemplate>
36 changes: 36 additions & 0 deletions BuildReleaseTaskItemTS/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BuildReleaseTaskItemTS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Joshua Garverick")]
[assembly: AssemblyProduct("BuildReleaseTaskItemTS")]
[assembly: AssemblyCopyright("Copyright © Joshua Garverick 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f3e37f69-8664-48a3-b1a3-145148487785")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Binary file added BuildReleaseTaskItemTS/VSOE.ico
Binary file not shown.
Binary file added BuildReleaseTaskItemTS/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions BuildReleaseTaskItemTS/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# VSTS Build/Release Task Item Template
49 changes: 49 additions & 0 deletions BuildReleaseTaskItemTS/task.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"id": "$guid1$",
"name": "$fileinputname$",
"friendlyName": "<<Your task's friendly name>>",
"description": "<<Your task description>>",
"helpMarkDown": "[More Information](https://url.to/yourmarkdown)",
"category": "Utility",
"visibility": [
"Build",
"Release"
],
"author": "$registeredorganization$",
"version": {
"Major": 1,
"Minor": 0,
"Patch": 0
},
"demands": [
],
"minimumAgentVersion": "1.83.0",
"groups": [

],
"inputs": [
{
"name": "variable1",
"type": "filePath",
"label": "Path to Solution File",
"defaultValue": "",
"required": true
},
{
"name": "variable2",
"type": "string",
"label": "Sample text variable",
"defaultValue": "",
"required": false,
"helpMarkDown": "This will give you a hover-over tooltip"
}
],
"instanceNameFormat": "$fileinputname$",
"execution": {
"PowerShell3": {
"target": "$(currentDirectory)\\$fileinputname$.ps1",
"argumentFormat": "",
"workingDirectory": "$(currentDirectory)"
}
}
}
18 changes: 18 additions & 0 deletions BuildReleaseTaskItemTS/task.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import Q = require('q');
import shell = require('shelljs');
import fs = require('fs');
import path = require('path');
import os = require('os');
import minimatch = require('minimatch');
import globm = require('glob');
import util = require('util');
import tcm = require('./taskcommand');
import trm = require('./toolrunner');
import vm = require('./vault');
import semver = require('semver');
require('./extensions');

export enum TaskResult {
Succeeded = 0,
Failed = 1
}
5 changes: 3 additions & 2 deletions DashboardWidgetItem/DashboardWidgetItem.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>14.0</OldToolsVersion>
<UpgradeBackupLocation />
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand Down
4 changes: 2 additions & 2 deletions DashboardWidgetItem/DashboardWidgetItem.vstemplate
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<Description>Creates a new dashboard widget for use with Visual Studio Team Services.</Description>
<Icon>VSOE.ico</Icon>
<TemplateID>f0f3c850-3590-4ea7-9d4b-f22ff49fc8ee</TemplateID>
<ProjectType>CSharp</ProjectType>
<AppliesTo>Web,JavaScript,TypeScript</AppliesTo>
<ProjectType>TypeScript</ProjectType>
<AppliesTo>Web,JavaScript</AppliesTo>
<RequiredFrameworkVersion>2.0</RequiredFrameworkVersion>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
<DefaultName>DashboardWidgetItem</DefaultName>
Expand Down
Loading

0 comments on commit 6adc72d

Please sign in to comment.