This repository has been archived by the owner on Jan 24, 2019. It is now read-only.
An optional publish
property has been added to both the configuration file as well as the parameter object passed to the .deploy()
task. Setting it to true
will increment the lambda functions version whenever you deploy. Setting it to false (or not setting it at all) will leave the version alone when pushing up new lambda function code.
Since you can also pipe this into the parameter object it allows you to publish code without increasing the version, then create a separate task for incrementing the version:
// gulpfile.js
var lambdaToolkit = require('aws-lambda-toolkit');
gulp.task('deploy', function () {
lambdaToolkit.deploy();
});
gulp.task('publish', function () {
lambdaToolkit.deploy({
publish: true
});
});
// tasks.js
var lambdaToolkit = require('aws-lambda-toolkit');
if (process.argv[process.argv.length - 1] === 'deploy') {
lambdaToolkit.deploy();
}
if (process.argv[process.argv.length - 1] === 'publish') {
lambdaToolkit.deploy({
publish: true
});
}
If you would like every deployment to increment the version (the old functionality), you can alternatively add the following to your .awstoolkitconfig.json
file:
{
. . .,
"publish": true,
. . .
}