Last active
August 29, 2015 13:56
-
-
Save sirkirby/8926127 to your computer and use it in GitHub Desktop.
Automate nuget with grunt Ex 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
clean: ["dist"], | |
shell: { | |
makeDir: { | |
command: 'mkdir dist' | |
} | |
}, | |
nugetpack: { | |
dist: { | |
src: 'src/*.nuspec', | |
dest: 'dist/' | |
} | |
}, | |
nugetpush: { | |
dist: { | |
src: 'dist/*.nupkg' | |
} | |
} | |
}); | |
// load contrib clean for prep | |
grunt.loadNpmTasks('grunt-contrib-clean'); | |
// load the shell plugin for cmd goodies | |
grunt.loadNpmTasks('grunt-shell'); | |
// Load the plugin that provides the "nuget" task. | |
grunt.loadNpmTasks('grunt-nuget'); | |
// Default task(s). | |
grunt.registerTask('default', ['clean', 'shell', 'nugetpack']); | |
// Build and publish to nuget task | |
grunt.registerTask('publish', ['clean', 'shell', 'nugetpack', 'nugetpush']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment