-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd3795f
commit 2e78e2d
Showing
5 changed files
with
26 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env node | ||
|
||
require('6to5/register') | ||
// require('6to5/register') | ||
require('./lib/index') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
let spawn = require('child_process').spawn, | ||
var spawn = require('child_process').spawn, | ||
parse = require('./lib/dokku-git-remote-stream') | ||
|
||
module.exports = (cb) => { | ||
let gitRemote = spawn('git', ['remote', '-v'], { cwd: process.cwd() }) | ||
module.exports = function (cb) { | ||
var gitRemote = spawn('git', ['remote', '-v'], { cwd: process.cwd() }) | ||
|
||
gitRemote.stdout | ||
.pipe(parse) | ||
.on('data', data => cb(data.host, data.appName)) | ||
.on('data', function (data) { | ||
cb(data.host, data.appName) | ||
}) | ||
} |
10 changes: 5 additions & 5 deletions
10
node/lib/dokku-git-remote-parser/lib/dokku-git-remote-stream/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
let through2 = require('through2') | ||
var through2 = require('through2') | ||
|
||
module.exports = through2.obj(function(chunk, enc, cb) { | ||
let remotes = chunk.toString().match(/dokku@([^:]*):(?:\/.*\/)?([^\s]*)/) | ||
let host = remotes[1] | ||
let appName = remotes[2] | ||
var remotes = chunk.toString().match(/dokku@([^:]*):(?:\/.*\/)?([^\s]*)/) | ||
var host = remotes[1] | ||
var appName = remotes[2] | ||
|
||
this.push({ host, appName }) | ||
this.push({ host: host, appName: appName }) | ||
cb() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters