From 125bf93d94ff137f08dbb74d4b4882be52ff6815 Mon Sep 17 00:00:00 2001 From: Josh Garverick Date: Thu, 25 Feb 2016 11:18:49 -0500 Subject: [PATCH 1/2] Adding support for parameters in gruntfile --- VSTSBuildTask/ProjectTemplate.csproj | 1 + VSTSBuildTask/VSOBuildTask.vstemplate | 1 + VSTSBuildTask/VSTSBuildTask.csproj | 1 + VSTSBuildTask/gruntfile.js | 5 +++-- VSTSBuildTask/settings.tfx.json | 11 +++++++++++ VSTSExt/ProjectTemplateTS.vstemplate | 2 +- VSTSExt/VSTSExt.csproj | 2 +- VSTSExt/VSTSExtension.csproj | 2 +- VSTSExt/gruntfile.js | 3 ++- VSTSExt/settings.vset.json | 10 ---------- VSTSExtensionPackage/ReleaseNotes.txt | 1 + VSTSExtensionPackage/source.extension.vsixmanifest | 2 +- 12 files changed, 24 insertions(+), 17 deletions(-) create mode 100644 VSTSBuildTask/settings.tfx.json delete mode 100644 VSTSExt/settings.vset.json diff --git a/VSTSBuildTask/ProjectTemplate.csproj b/VSTSBuildTask/ProjectTemplate.csproj index 16b4f9b..e0ebaee 100644 --- a/VSTSBuildTask/ProjectTemplate.csproj +++ b/VSTSBuildTask/ProjectTemplate.csproj @@ -39,6 +39,7 @@ + diff --git a/VSTSBuildTask/VSOBuildTask.vstemplate b/VSTSBuildTask/VSOBuildTask.vstemplate index 5a7af42..792501e 100644 --- a/VSTSBuildTask/VSOBuildTask.vstemplate +++ b/VSTSBuildTask/VSOBuildTask.vstemplate @@ -19,6 +19,7 @@ gruntfile.js package.json vss-extension.json + settings.tfx.json tasks.json diff --git a/VSTSBuildTask/VSTSBuildTask.csproj b/VSTSBuildTask/VSTSBuildTask.csproj index a001c92..7d983ea 100644 --- a/VSTSBuildTask/VSTSBuildTask.csproj +++ b/VSTSBuildTask/VSTSBuildTask.csproj @@ -83,6 +83,7 @@ Designer + diff --git a/VSTSBuildTask/gruntfile.js b/VSTSBuildTask/gruntfile.js index 9307811..23ed8ae 100644 --- a/VSTSBuildTask/gruntfile.js +++ b/VSTSBuildTask/gruntfile.js @@ -6,6 +6,7 @@ Click here to learn more. http://go.microsoft.com/fwlink/?LinkID=513275&clcid=0x module.exports = function (grunt) { grunt.initConfig({ pkg: grunt.file.readJSON("package.json"), + settings: grunt.file.readJSON("settings.tfx.json"), exec: { update: { command: "npm up --save-dev", @@ -13,12 +14,12 @@ module.exports = function (grunt) { stderr: true }, publish_task: { - command: "tfx build tasks upload --token YOURTOKEN --auth-type pat --task-path ./tasks/ExampleTask --service-url https://your.visualstudio.com.account", + command: "tfx build tasks upload --token <%= settings.publish.token %> --auth-type pat --task-path ./tasks/ExampleTask --service-url <%= settings.serviceUrl %>", stdout: true, stderr: true }, publish_ext: { - command: "tfx extension publish --token YOURTOKEN --auth-type pat --service-url https://your.visualstudio.com.account", + command: "tfx extension publish --token <%= settings.publish.token %> --auth-type pat --service-url <%= settings.serviceUrl %>", stdout: true, stderr: true }, diff --git a/VSTSBuildTask/settings.tfx.json b/VSTSBuildTask/settings.tfx.json new file mode 100644 index 0000000..f260d5d --- /dev/null +++ b/VSTSBuildTask/settings.tfx.json @@ -0,0 +1,11 @@ +{ + "serviceUrl": "https://your.visualstudio.com.account", + "package": { + "manifestGlobs": [ "vss-extension.json" ] + }, + "publish": { + "galleryUrl": "https://marketplace.visualstudio.com/", + "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "shareWith": "youraccount" + } +} diff --git a/VSTSExt/ProjectTemplateTS.vstemplate b/VSTSExt/ProjectTemplateTS.vstemplate index 4b03173..3e977fd 100644 --- a/VSTSExt/ProjectTemplateTS.vstemplate +++ b/VSTSExt/ProjectTemplateTS.vstemplate @@ -18,7 +18,7 @@ vss-extension.json index.html package.json - settings.vset.json + settings.tfx.json gruntfile.js tasks.json diff --git a/VSTSExt/VSTSExt.csproj b/VSTSExt/VSTSExt.csproj index c641610..7edc0f2 100644 --- a/VSTSExt/VSTSExt.csproj +++ b/VSTSExt/VSTSExt.csproj @@ -72,7 +72,7 @@ - + Designer diff --git a/VSTSExt/VSTSExtension.csproj b/VSTSExt/VSTSExtension.csproj index 8cd24db..030480c 100644 --- a/VSTSExt/VSTSExtension.csproj +++ b/VSTSExt/VSTSExtension.csproj @@ -61,7 +61,7 @@ - + diff --git a/VSTSExt/gruntfile.js b/VSTSExt/gruntfile.js index 468fd11..22a993c 100644 --- a/VSTSExt/gruntfile.js +++ b/VSTSExt/gruntfile.js @@ -6,6 +6,7 @@ Click here to learn more. http://go.microsoft.com/fwlink/?LinkID=513275&clcid=0x module.exports = function (grunt) { grunt.initConfig({ pkg: grunt.file.readJSON("package.json"), + settings: grunt.file.readJSON("settings.tfx.json"), exec: { package: { command: "tfx extension create --manifest-globs vss-extension.json", @@ -28,7 +29,7 @@ module.exports = function (grunt) { stderr: true }, publish: { - command: "tfx extension publish --manifest-globs vss-extension.json --share-with <> --token <>", + command: "tfx extension publish --manifest-globs vss-extension.json --share-with <%= settings.pubhlish.shareWith %> --token <%= settings.publish.token %>", stdout: true, stderr: true } diff --git a/VSTSExt/settings.vset.json b/VSTSExt/settings.vset.json deleted file mode 100644 index f644015..0000000 --- a/VSTSExt/settings.vset.json +++ /dev/null @@ -1,10 +0,0 @@ -{ -"package": { - "manifestGlobs": ["vss-extension.json"] - }, - "publish": { - "galleryUrl": "https://marketplace.visualstudio.com/", - "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", - "publisher": "your-publisher-id" - } -} diff --git a/VSTSExtensionPackage/ReleaseNotes.txt b/VSTSExtensionPackage/ReleaseNotes.txt index 16f0d2c..24f2874 100644 --- a/VSTSExtensionPackage/ReleaseNotes.txt +++ b/VSTSExtensionPackage/ReleaseNotes.txt @@ -1,6 +1,7 @@ Release Notes ============= +* Version 2.3: Added support for parameters with gruntfile * Version 2.2: Updating manifest for build extension to highlight specifics on task contributions; modified gruntfile to allow for task publish, extension package, and extension publish * Version 2.1.1: Fix for invalid syntax * Version 2.1: Updated reference to vss-sdk to vss-web-extension-sdk diff --git a/VSTSExtensionPackage/source.extension.vsixmanifest b/VSTSExtensionPackage/source.extension.vsixmanifest index ff8f43a..842c5bc 100644 --- a/VSTSExtensionPackage/source.extension.vsixmanifest +++ b/VSTSExtensionPackage/source.extension.vsixmanifest @@ -1,7 +1,7 @@ - + VSTS Extension Project Templates This extension contains Visual Studio project templates supplying you with everything you need to create a Visual Studio Team Services extension or a custom VSTS build/release task. https://github.com/jgarverick/vsts-ext-proj-templates From 82a5aefd8762452b6d9ad810963a07e37b822525 Mon Sep 17 00:00:00 2001 From: Josh Garverick Date: Fri, 26 Feb 2016 20:24:40 -0500 Subject: [PATCH 2/2] Shoring up some path issues along with a ref to a nonexistent folder --- .../{tasks => }/ExampleTask/ExampleTask.ps1 | 0 VSTSBuildTask/{tasks => }/ExampleTask/icon.png | Bin VSTSBuildTask/{tasks => }/ExampleTask/task.json | 0 VSTSBuildTask/ProjectTemplate.csproj | 6 +++--- VSTSBuildTask/VSOBuildTask.vstemplate | 4 ++-- VSTSBuildTask/VSTSBuildTask.csproj | 6 +++--- VSTSBuildTask/gruntfile.js | 4 ++-- VSTSBuildTask/package.json | 2 +- VSTSBuildTask/vss-extension.json | 2 +- VSTSExt/package.json | 2 +- VSTSExtensionPackage/ReleaseNotes.txt | 1 + 11 files changed, 14 insertions(+), 13 deletions(-) rename VSTSBuildTask/{tasks => }/ExampleTask/ExampleTask.ps1 (100%) rename VSTSBuildTask/{tasks => }/ExampleTask/icon.png (100%) rename VSTSBuildTask/{tasks => }/ExampleTask/task.json (100%) diff --git a/VSTSBuildTask/tasks/ExampleTask/ExampleTask.ps1 b/VSTSBuildTask/ExampleTask/ExampleTask.ps1 similarity index 100% rename from VSTSBuildTask/tasks/ExampleTask/ExampleTask.ps1 rename to VSTSBuildTask/ExampleTask/ExampleTask.ps1 diff --git a/VSTSBuildTask/tasks/ExampleTask/icon.png b/VSTSBuildTask/ExampleTask/icon.png similarity index 100% rename from VSTSBuildTask/tasks/ExampleTask/icon.png rename to VSTSBuildTask/ExampleTask/icon.png diff --git a/VSTSBuildTask/tasks/ExampleTask/task.json b/VSTSBuildTask/ExampleTask/task.json similarity index 100% rename from VSTSBuildTask/tasks/ExampleTask/task.json rename to VSTSBuildTask/ExampleTask/task.json diff --git a/VSTSBuildTask/ProjectTemplate.csproj b/VSTSBuildTask/ProjectTemplate.csproj index e0ebaee..d8d6d19 100644 --- a/VSTSBuildTask/ProjectTemplate.csproj +++ b/VSTSBuildTask/ProjectTemplate.csproj @@ -45,9 +45,9 @@ - - - + + + false diff --git a/VSTSBuildTask/VSOBuildTask.vstemplate b/VSTSBuildTask/VSOBuildTask.vstemplate index 792501e..781755f 100644 --- a/VSTSBuildTask/VSOBuildTask.vstemplate +++ b/VSTSBuildTask/VSOBuildTask.vstemplate @@ -26,13 +26,13 @@ logo.png - + ExampleTask.ps1 icon.png task.json - + TestSpec.js diff --git a/VSTSBuildTask/VSTSBuildTask.csproj b/VSTSBuildTask/VSTSBuildTask.csproj index 7d983ea..3983dc5 100644 --- a/VSTSBuildTask/VSTSBuildTask.csproj +++ b/VSTSBuildTask/VSTSBuildTask.csproj @@ -84,8 +84,8 @@ - - + + @@ -96,7 +96,7 @@ - + diff --git a/VSTSBuildTask/gruntfile.js b/VSTSBuildTask/gruntfile.js index 23ed8ae..e366fcc 100644 --- a/VSTSBuildTask/gruntfile.js +++ b/VSTSBuildTask/gruntfile.js @@ -14,7 +14,7 @@ module.exports = function (grunt) { stderr: true }, publish_task: { - command: "tfx build tasks upload --token <%= settings.publish.token %> --auth-type pat --task-path ./tasks/ExampleTask --service-url <%= settings.serviceUrl %>", + command: "tfx build tasks upload --token <%= settings.publish.token %> --auth-type pat --task-path ./ExampleTask --service-url <%= settings.serviceUrl %>", stdout: true, stderr: true }, @@ -30,7 +30,7 @@ module.exports = function (grunt) { } }, jasmine: { - src: ["scripts/**/*.js", "sdk/scripts/*.js"], + src: ["scripts/**/*.js"], specs: "test/**/*[sS]pec.js", helpers: "test/helpers/*.js" } diff --git a/VSTSBuildTask/package.json b/VSTSBuildTask/package.json index 0d0bedb..61e7f18 100644 --- a/VSTSBuildTask/package.json +++ b/VSTSBuildTask/package.json @@ -5,7 +5,7 @@ "grunt-contrib-jasmine": "^0.9.2", "grunt-exec": "~0.4.6", "jasmine": "~2.3.2", - "tfx-cli": "^0.3.14", + "tfx-cli": "^0.3.15", "vss-web-extension-sdk": "~1.95.2" }, "name": "", diff --git a/VSTSBuildTask/vss-extension.json b/VSTSBuildTask/vss-extension.json index 5245567..fe2af8c 100644 --- a/VSTSBuildTask/vss-extension.json +++ b/VSTSBuildTask/vss-extension.json @@ -45,7 +45,7 @@ }, "files": [ { - "path": "tasks/ExampleTask" + "path": "ExampleTask" } ], "categories": [ diff --git a/VSTSExt/package.json b/VSTSExt/package.json index bf32028..2f5a000 100644 --- a/VSTSExt/package.json +++ b/VSTSExt/package.json @@ -5,7 +5,7 @@ "grunt-contrib-jasmine": "^0.9.2", "grunt-exec": "~0.4.6", "jasmine": "~2.3.2", - "tfx-cli": "^0.3.14", + "tfx-cli": "^0.3.15", "tsd": "~0.6.5", "vss-web-extension-sdk": "~1.95.2" }, diff --git a/VSTSExtensionPackage/ReleaseNotes.txt b/VSTSExtensionPackage/ReleaseNotes.txt index 24f2874..fc98c96 100644 --- a/VSTSExtensionPackage/ReleaseNotes.txt +++ b/VSTSExtensionPackage/ReleaseNotes.txt @@ -1,6 +1,7 @@ Release Notes ============= +* Version 2.4: Added dashboard widget item template * Version 2.3: Added support for parameters with gruntfile * Version 2.2: Updating manifest for build extension to highlight specifics on task contributions; modified gruntfile to allow for task publish, extension package, and extension publish * Version 2.1.1: Fix for invalid syntax