@convertkit/cloudkit
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -1,1 +0,1 @@ | ||
{"version":"0.0.2","commands":{"console":{"id":"console","description":"\nStarts a remote Rails console.\n","pluginName":"@convertkit/cloudkit","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"environment","default":"production"}]},"migrate":{"id":"migrate","description":"Describe the command here\n...\nExtra documentation goes here\n","pluginName":"@convertkit/cloudkit","pluginType":"core","aliases":[],"flags":{"name":{"name":"name","type":"option","char":"n","description":"name to print"}},"args":[]}}} | ||
{"version":"0.0.3","commands":{"console":{"id":"console","description":"\nStarts a remote Rails console.\n","pluginName":"@convertkit/cloudkit","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"environment","default":"production"}]},"migrate:status":{"id":"migrate:status","description":"Describe the command here\n...\nExtra documentation goes here\n","pluginName":"@convertkit/cloudkit","pluginType":"core","aliases":[],"flags":{"environment":{"name":"environment","type":"option","char":"e","description":"environment","default":"production"}},"args":[]}}} |
{ | ||
"name": "@convertkit/cloudkit", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"author": "Brendan Carney @brendancarney", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -22,3 +22,3 @@ @convertkit/cloudkit | ||
$ cloudkit (-v|--version|version) | ||
@convertkit/cloudkit/0.0.2 darwin-x64 node-v11.9.0 | ||
@convertkit/cloudkit/0.0.3 darwin-x64 node-v11.9.0 | ||
$ cloudkit --help [COMMAND] | ||
@@ -34,3 +34,3 @@ USAGE | ||
* [`cloudkit help [COMMAND]`](#cloudkit-help-command) | ||
* [`cloudkit migrate`](#cloudkit-migrate) | ||
* [`cloudkit migrate:status`](#cloudkit-migratestatus) | ||
@@ -49,3 +49,3 @@ ## `cloudkit console [ENVIRONMENT]` | ||
_See code: [src/commands/console.js](https://github.com/brendancarney/cloudkit-cli/blob/v0.0.2/src/commands/console.js)_ | ||
_See code: [src/commands/console.js](https://github.com/brendancarney/cloudkit-cli/blob/v0.0.3/src/commands/console.js)_ | ||
@@ -69,3 +69,3 @@ ## `cloudkit help [COMMAND]` | ||
## `cloudkit migrate` | ||
## `cloudkit migrate:status` | ||
@@ -76,6 +76,6 @@ Describe the command here | ||
USAGE | ||
$ cloudkit migrate | ||
$ cloudkit migrate:status | ||
OPTIONS | ||
-n, --name=name name to print | ||
-e, --environment=environment [default: production] environment | ||
@@ -87,3 +87,3 @@ DESCRIPTION | ||
_See code: [src/commands/migrate.js](https://github.com/brendancarney/cloudkit-cli/blob/v0.0.2/src/commands/migrate.js)_ | ||
_See code: [src/commands/migrate/status.js](https://github.com/brendancarney/cloudkit-cli/blob/v0.0.3/src/commands/migrate/status.js)_ | ||
<!-- commandsstop --> |
const { Command, flags } = require("@oclif/command"); | ||
const { cli } = require("cli-ux"); | ||
async function getIP(environment) { | ||
const deployHost = | ||
environment == "production" ? "production-deploy" : "staging-deploy"; | ||
const rs = shell.exec( | ||
`ssh ${deployHost} -t 'cd convertkit-deploy; ansible all --list --limit tag_CodeDeployApp_convertkit'`, | ||
{ silent: true } | ||
); | ||
return rs.match(/\d+\.\d+\.\d+.\d+/)[0]; | ||
} | ||
var shell = require("shelljs"); | ||
const getIP = require("../utils/get-ip"); | ||
const { spawn } = require("child_process"); | ||
@@ -22,2 +8,3 @@ | ||
const { args } = this.parse(ConsoleCommand); | ||
const ip = await getIP(args.environment); | ||
@@ -32,3 +19,3 @@ | ||
"-t", | ||
'docker_image=$(sudo docker ps -aqf "name=puma|sidekiq"); sudo docker exec -ti $docker_image bundle exec rails c \n' | ||
"sudo -u root bash -c 'cd /srv/ckapp/current && make console'" | ||
], | ||
@@ -35,0 +22,0 @@ { stdio: "inherit" } |
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
6553
11
87