Socket
Socket
Sign inDemoInstall

dokku-deploy

Package Overview
Dependencies
97
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.0.3

27

dokku-deploy.js

@@ -40,2 +40,16 @@ const inquirer = require('inquirer');

return Promise.resolve().then(() => {
if (!this.project) {
return readPackageJSON(this.cwd).then((app) => {
this.project = app;
}).catch(() => {
throw new Error('Not a Node.js project');
});
}
return Promise.resolve();
}).then(() => {
return execPromise('git remote get-url dokku').catch((err) => null);
}).then((currentURL) => {
if (currentURL) {
return Promise.resolve({choice: true, currentURL: currentURL.trim()});
}
if (!choice) {

@@ -55,11 +69,14 @@ console.log(chalk.whiteBright('Looks like this repo isn\'t setup to deploy to dokku.'));

}
const example = chalk.gray(`(e.g ssh://dokku@example.com/${this.project.name || 'my-project'})`);
const example = chalk.gray(` (e.g ssh://dokku@example.com/${this.project.name || 'my-project'})`);
return inquirer.prompt({
type: 'input',
name: 'url',
message: `Enter your dokku URL ${example}:`,
message: `Enter your dokku URL${!answer.currentURL && example || ''}:`,
default: answer.currentURL || undefined
});
}).then((answer) => {
console.log(chalk.gray('Setting up dokku remote URL...'));
return execPromise(`git remote add dokku ${answer.url}`);
return execPromise(`git remote add dokku ${answer.url}`).catch(() => {
return execPromise(`git remote set-url dokku ${answer.url}`);
});
}).then(() => {

@@ -204,3 +221,3 @@ console.log(chalk.whiteBright('done! You can now re-run your command'));

}
});
}).catch(() => null);
}).then(() => {

@@ -215,3 +232,3 @@ return wait(3, (count) => {

return spawnPromise(`git push -f dokku ${tag}~0:master`, (data) => {
return spawnPromise(`git push -f dokku ${tag}~0:refs/heads/master`, (data) => {
process.stdout.write(chalk.gray(data));

@@ -218,0 +235,0 @@ }).catch(() => {

2

package.json
{
"name": "dokku-deploy",
"version": "1.0.2",
"version": "1.0.3",
"description": "A deployment tool for dokku.",

@@ -5,0 +5,0 @@ "main": "dokku-deploy.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc