git-to-k8s
Advanced tools
Comparing version 0.0.4 to 0.0.5
17
index.js
@@ -74,3 +74,9 @@ #! /usr/bin/env node | ||
const shell = { | ||
run (...args) { | ||
run (..._args) { | ||
let args = _args | ||
if (/^cd /.test(_args[0])) { | ||
shell.cd(_args[0].replace(/^cd /, '')) | ||
args = _args[1] | ||
} | ||
if (args.length < 1) return | ||
const ctx = _shell.exec(...args) | ||
@@ -80,3 +86,10 @@ if (ctx.code !== 0) logger.fatal(`Failed to run ${args.join(' ')}`) | ||
}, | ||
safe_run(...args) { | ||
safe_run(..._args) { | ||
let args = _args | ||
if (/^cd /.test(_args[0])) { | ||
shell.cd(_args[0].replace(/^cd /, '')) | ||
args = _args[1] | ||
} | ||
if (args.length < 1) return | ||
const ctx = _shell.exec(...args) | ||
@@ -83,0 +96,0 @@ if (ctx.code !== 0) logger.warn(`Failed to run ${args.join(' ')}`) |
{ | ||
"name": "git-to-k8s", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Small tool to automate the git to url flow on k8s", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
83400
2158