grunt-fluentmigrator
Advanced tools
Comparing version 0.1.2 to 0.1.4
@@ -0,0 +0,0 @@ module.exports = function(grunt) { |
{ | ||
"name": "grunt-fluentmigrator", | ||
"version": "0.1.2", | ||
"version": "0.1.4", | ||
"description": "Fluent Migrator wrapper", | ||
@@ -28,3 +28,6 @@ "main": "Gruntfile.js", | ||
"grunt-release": "~0.7.0" | ||
}, | ||
"dependencies": { | ||
"underscore": "~1.7.0" | ||
} | ||
} |
@@ -8,9 +8,9 @@ ### Overview | ||
options: { | ||
exePath: 'tools/migrator/Migrate.exe', | ||
params: { | ||
assembly : 'src/SomeProject.Migrations/bin/Debug/SomeProject.Migrations.dll', | ||
output: true, | ||
outputFileName: 'migrated.sql', | ||
conn: "Server=.;initial catalog=SiteDb;Integrated Security=true;" | ||
} | ||
exePath: 'tools/migrator/Migrate.exe' | ||
}, | ||
file: { | ||
assembly : 'src/SomeProject.Migrations/bin/Debug/SomeProject.Migrations.dll', | ||
output: true, | ||
outputFileName: 'migrated.sql', | ||
conn: "Server=.;initial catalog=SiteDb;Integrated Security=true;" | ||
} | ||
@@ -27,12 +27,18 @@ } | ||
exePath: 'Migrate.exe', | ||
params: { | ||
provider: 'sqlserver2012', | ||
preview: true, | ||
task: 'migrate' | ||
} | ||
provider: 'sqlserver2012', | ||
task: 'migrate' | ||
} | ||
``` | ||
### Accepted command line arguments | ||
``` | ||
'assebly', 'provider', 'conn', 'task', 'verbose', 'output', 'outfile', 'namespace', 'steps', 'preview', 'version', 'profile', 'timeout', 'workingdirectory', 'tag', 'context', 'tps' | ||
``` | ||
### Change log | ||
0.1.3 (December 14, 2014) | ||
* multitasking | ||
* more concise task syntax | ||
0.1.2 (June 9, 2014) | ||
@@ -39,0 +45,0 @@ * Support all command-line parameters |
var spawn = require('child_process').spawn, | ||
extend = require('./../utils').extend, | ||
_ = require('underscore'), | ||
cliArgsWhitelist = ['assembly', 'provider', 'conn', 'task', 'verbose', 'output', 'outfile', 'namespace', 'steps', 'preview', 'version', 'profile', 'timeout', 'workingdirectory', 'tag', 'context', 'tps' ], | ||
buildCommandParameters = require('./../utils').buildCommandParameters; | ||
module.exports = function(grunt) { | ||
grunt.registerTask('fluentmigrator', 'Migration starting', function() { | ||
var options = extend({ | ||
grunt.registerMultiTask('fluentmigrator', 'Fluent migrator cli wrapper', function() { | ||
var options = _.extend(this.options({ | ||
exePath: 'Migrate.exe', | ||
params: { | ||
provider: 'sqlserver2012', | ||
preview: true, | ||
task: 'migrate' | ||
} | ||
}, this.options()), | ||
provider: 'sqlserver2012', | ||
task: 'migrate' | ||
}), this.data), | ||
done = this.async(), | ||
@@ -19,3 +17,5 @@ log = function(message) { | ||
}, | ||
migrate = spawn(options.exePath, buildCommandParameters(options.params)); | ||
commandParams = buildCommandParameters(_.pick(options, cliArgsWhitelist)); | ||
grunt.verbose.writeln("executing " + options.exePath + " " + commandParams.join(' ')) | ||
var migrate = spawn(options.exePath, commandParams); | ||
@@ -22,0 +22,0 @@ migrate.stdout.on('data', log); |
@@ -0,0 +0,0 @@ exports.extend = function extend(dest, from) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5566
50
2
+ Addedunderscore@~1.7.0