git-pull-run
Advanced tools
Comparing version
{ | ||
"name": "git-pull-run", | ||
"version": "1.1.1-next.0", | ||
"version": "1.1.1-next.1", | ||
"description": "Run commands and scripts after git pull", | ||
@@ -5,0 +5,0 @@ "bin": "./dist/cli.js", |
@@ -9,6 +9,2 @@ import debugLog from 'debug'; | ||
debugLog.enable('git-pull-run'); | ||
function humanize(ms) { | ||
return ``; | ||
} | ||
debugLog.humanize = humanize; | ||
const info = debugLog.debug('git-pull-run'); | ||
@@ -31,12 +27,16 @@ info.log = console.log.bind(console); | ||
} | ||
for (const change of changes) { | ||
const { directory } = getAbsolutePath(gitDir, change); | ||
if (command) { | ||
info(`Running command '${command}' for change '${change}' in directory ${directory}...`); | ||
await runCommand(command, directory); | ||
if (command || script) { | ||
info(`Running tasks for ${changes.length} ${changes.length === 1 ? 'change' : 'changes'}`); | ||
for (const change of changes) { | ||
const { directory } = getAbsolutePath(gitDir, change); | ||
info(`> ${change}`); | ||
if (command) { | ||
info(`${directory} > ${command}`); | ||
await runCommand(command, directory); | ||
} | ||
if (script) { | ||
info(`${directory} > ${command}`); | ||
await runScript(script, directory); | ||
} | ||
} | ||
if (script) { | ||
info(`Running script '${script}' for change '${change}' in directory ${directory}...`); | ||
await runScript(script, directory); | ||
} | ||
} | ||
@@ -43,0 +43,0 @@ } |
{ | ||
"name": "git-pull-run", | ||
"version": "1.1.1-next.1", | ||
"version": "1.1.1-next.2", | ||
"description": "Run commands and scripts after git pull", | ||
@@ -5,0 +5,0 @@ "bin": "./dist/cli.js", |
@@ -19,8 +19,8 @@ import debugLog from 'debug'; | ||
function humanize(ms: number): string; | ||
function humanize(ms: string): number; | ||
function humanize(ms: number | string): string | number { | ||
return ``; | ||
} | ||
debugLog.humanize = humanize; | ||
// function humanize(ms: number): string; | ||
// function humanize(ms: string): number; | ||
// function humanize(ms: number | string): string | number { | ||
// return ``; | ||
// } | ||
// debugLog.humanize = humanize; | ||
@@ -30,3 +30,7 @@ const info = debugLog.debug('git-pull-run'); | ||
// const test = debugLog('test'); | ||
// test("test 1"); | ||
// test("test 2"); | ||
export { info }; | ||
@@ -50,15 +54,25 @@ | ||
for (const change of changes) { | ||
const { directory } = getAbsolutePath(gitDir, change); | ||
if (command || script) { | ||
info(`Running tasks for ${changes.length} ${changes.length === 1 ? 'change' : 'changes'}`); | ||
if (command) { | ||
info(`Running command '${command}' for change '${change}' in directory ${directory}...`); | ||
await runCommand(command, directory); | ||
} | ||
for (const change of changes) { | ||
const { directory } = getAbsolutePath(gitDir, change); | ||
if (script) { | ||
info(`Running script '${script}' for change '${change}' in directory ${directory}...`); | ||
await runScript(script, directory); | ||
info(`> ${change}`); | ||
if (command) { | ||
// info(`Running command '${command}' for change '${change}' in directory ${directory}...`); | ||
info(`${directory} > ${command}`); | ||
await runCommand(command, directory); | ||
} | ||
if (script) { | ||
// info(`Running script '${script}' for change '${change}' in directory ${directory}...`); | ||
info(`${directory} > ${command}`); | ||
await runScript(script, directory); | ||
} | ||
} | ||
} | ||
} catch (error) { | ||
@@ -65,0 +79,0 @@ console.log('error', error); |
@@ -10,2 +10,3 @@ { | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": false | ||
}, | ||
@@ -12,0 +13,0 @@ "include": [ |
Sorry, the diff of this file is not supported yet
46409
1.17%668
1.52%