diff --git a/gruntfile.js b/gruntfile.js index c9a92b9..a14c923 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -20,6 +20,7 @@ module.exports = function(grunt) { platform: 'Any CPU', styleCopRules: 'Settings.StyleCop', ruleSet: 'rules.ruleset', + nuspecFile: 'package.nuspec', pkg: grunt.file.readJSON('package.json'), @@ -42,7 +43,10 @@ module.exports = function(grunt) { options: { projectConfiguration: 'Release', platform: '<%= platform %>', - targets: ['Clean', 'Rebuild'] + targets: ['Clean', 'Rebuild'], + buildParameters: { + StyleCopEnabled: false + } } }, debug: { @@ -65,9 +69,34 @@ module.exports = function(grunt) { mstest: { debug: { - src: ['<%= srcPath %>/**/bin/Debug/*.dll','<%= srcPath %>/**/bin/Debug/*.exe'] // Points to test dll + src: ['<%= srcPath %>/**/bin/Debug/*.dll', '<%= srcPath %>/**/bin/Debug/*.exe'] // Points to test dll + } + }, + + nugetpack: { + dist: { + src: '<%= nuspecFile %>', + dest: '.', + + options: { + version: '<%= pkg.version %>', + basePath: '<%= srcPath %>/h-behavior/bin/Release', + includeReferencedProjects: true, + excludeEmptyDirectories: true, + verbose: true, + symbols: true + } } - } + }, + + nugetpush: { + src: '*.<%= pkg.version %>.nupkg', + options: {} + }, + + clean: { + nuget: ['*.nupkg'], + }, }); @@ -75,4 +104,5 @@ module.exports = function(grunt) { grunt.registerTask('build', ['msbuild:release']); grunt.registerTask('test', ['msbuild:debug', 'mstest']); grunt.registerTask('release', ['test', 'assemblyinfo']); + grunt.registerTask('publishNuget', ['release', 'msbuild:release', 'nugetpack', 'nugetpush', 'clean:nuget']); }; diff --git a/package.json b/package.json index 6000b73..dc0956e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,9 @@ "grunt-msbuild": "^0.2.2", "grunt-mstest": "^0.1.5", "load-grunt-tasks": "^0.6.0", - "time-grunt": "^1.0.0" + "time-grunt": "^1.0.0", + "grunt-nuget": "~0.1.3", + "grunt-contrib-clean": "~0.6.0" }, "engines": { "node": ">=0.8.0" diff --git a/package.nuspec b/package.nuspec new file mode 100644 index 0000000..bf90f7c --- /dev/null +++ b/package.nuspec @@ -0,0 +1,20 @@ + + + + Hylasoft.Behavior + 0.0 + Hylasoft.Behavior + Behavior Driven Development (BDD) wrapper for .NET MsTests + Giacomo Tagliabue + en-US + Hylasoft Usa + https://github.com/hylasoft-usa/h-behavior/blob/master/LICENSE + https://github.com/hylasoft-usa/h-behavior/ + false + Test BDD Spec Behavior Hyla Hylasoft + + + + + +