build-workflow
Advanced tools
Comparing version 0.0.30 to 0.0.31
@@ -73,3 +73,12 @@ /** | ||
// should only load the `grunt-*` tasks from the `devDependencies` | ||
filterDevOnly: true | ||
filterDevOnly: true, | ||
// ### replaceVersionWithBuildNumber | ||
// when true the pkg.version will be replaced by the passed `--build-number` grunt option | ||
replaceVersionWithBuildNumber: true, | ||
// ### defaultVersionWhenNoBuildNumber | ||
// what value to use as the version when no `--build-number` has being passed | ||
defaultVersionWhenNoBuildNumber: 'dev' | ||
}; | ||
@@ -142,9 +151,12 @@ | ||
var pkg = grunt.file.readJSON( file ); | ||
var optionBuildNumber = grunt.option( 'build-number' ) || 'dev'; | ||
var optionBuildNumber = grunt.option( 'build-number' ) || opts.defaultVersionWhenNoBuildNumber; | ||
// just in case make sure the `grunt.option` is set so if from other configuration files | ||
// this options is used will have the right value | ||
pkg.version = optionBuildNumber || pkg.version; | ||
grunt.option( 'build-number', pkg.version ); | ||
optionBuildNumber && grunt.option( 'build-number', optionBuildNumber ); | ||
if ( opts.replaceVersionWithBuildNumber ) { | ||
// just in case make sure the `grunt.option` is set so if from other configuration files | ||
// this options is used will have the right value | ||
pkg.version = optionBuildNumber || pkg.version; | ||
} | ||
// helper options are a set of arguments that are going to be passed to all the `base tasks` and `local tasks` definitions | ||
@@ -151,0 +163,0 @@ var helperOptions = { |
{ | ||
"name": "build-workflow", | ||
"version": "0.0.30", | ||
"version": "0.0.31", | ||
"description": "Simple gruntfile helper to define build workflows", | ||
@@ -5,0 +5,0 @@ "main": "config-loader.js", |
/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> | ||
* <%= pkg.homepage ? pkg.homepage : "" %> | ||
* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %> */ | ||
* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %> */ | ||
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
2411
159218