Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-deployinator

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-deployinator - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

17

lib/deployinator.js

@@ -5,2 +5,18 @@ var Promise = require('promise'),

function deploySetup(options) {
var commands;
commands = [
"mkdir -p " + options.directory,
'cd ' + options.directory,
"git clone " + options.package.repository.url + ' .'
];
if (options.buildCommands) {
commands = commands.concat(options.buildCommands);
}
return run("ssh " + options.host + " '" + commands.join(';') + "'");
}
function deployPush(options) {

@@ -56,4 +72,5 @@ return tagRelease(options).then(function () {

module.exports.deploySetup = deploySetup;
module.exports.deployPush = deployPush;
module.exports.deployPull = deployPull;
module.exports.tagRelease = tagRelease;

2

package.json
{
"name": "grunt-deployinator",
"description": "Grunt plugin that deploys git repositories on remote servers.",
"version": "0.3.1",
"version": "0.3.2",
"homepage": "https://github.com/istvan-antal/grunt-deployinator",

@@ -6,0 +6,0 @@ "author": {

@@ -11,14 +11,36 @@ /*

var deployinator = require('../lib/deployinator.js');
function deploySetup(options) {
var pkg = grunt.file.readJSON('package.json');
options.package = pkg;
if (!pkg.repository ||
!pkg.repository.type ||
pkg.repository.type !== 'git' ||
!pkg.repository.url) {
grunt.fail.fatal('Please sepecify the repository in the package.json');
}
return deployinator.deploySetup(options);
}
grunt.registerMultiTask('deployPull',
'SSH into a server and do a pull', function() {
var options = this.options();
options.increment = getVersionIncrement();
var done = this.async();
if (!options.host || !options.directory) {
grunt.fail.fatal('Please sepecify a host and directory.');
}
var done = this.async();
if (grunt.option('setup')) {
return deploySetup(options).then(function (output) {
grunt.log.writeln(output);
done();
});
}
options.increment = getVersionIncrement();
deployinator.deployPull(options).then(function (output) {

@@ -29,3 +51,3 @@ grunt.log.writeln(output);

});
grunt.registerMultiTask('deployPush',

@@ -35,9 +57,9 @@ 'Push to a server to deploy', function() {

options.increment = getVersionIncrement();
if (!options.remote) {
grunt.fail.fatal('Please sepecify a remote.');
}
var done = this.async();
deployinator.deployPush(options).then(function (output) {

@@ -48,14 +70,26 @@ grunt.log.writeln(output);

});
grunt.registerMultiTask('npmDeploy',
'Publish an NPM module', function() {
var done = this.async();
//TODO
deployinator.npmDeploy().then(function (output) {
grunt.log.writeln(output);
done();
});
});
grunt.registerTask('tagRelease',
'Creates a git tag for the release.', function() {
var done = this.async(),
options = this.options();
options.increment = getVersionIncrement();
deployinator.tagRelease(options).then(done);
});
function getVersionIncrement() {

@@ -65,9 +99,9 @@ if (grunt.option('majorRelease')) {

}
if (grunt.option('release')) {
return 'minor';
}
return 'patch';
}
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc