@pie-framework/build-helper
Advanced tools
Comparing version 4.2.0 to 4.2.1
@@ -11,3 +11,3 @@ /// <reference types="node" /> | ||
runCmd(cmd: any, opts?: any): Promise<Buffer | string | undefined>; | ||
commit(files: string[], msg: string): Promise<Buffer | string | undefined>; | ||
commit(files: string[], msg: string): Promise<(Buffer | string)[]>; | ||
runCmds(cmds: string[], opts?: any): Promise<(Buffer | string | undefined)[]>; | ||
@@ -14,0 +14,0 @@ series(cmds: string[], fn: (cmd: string) => Promise<any>): Promise<any>; |
@@ -17,2 +17,3 @@ "use strict"; | ||
const series_1 = require("./series"); | ||
const git_helper_1 = require("./git-helper"); | ||
const { resolve, relative } = require('path'); | ||
@@ -26,11 +27,2 @@ const debug = require('debug'); | ||
const root = (root, n) => resolve(root, n); | ||
const gitStatus = (shortResult) => { | ||
const lines = shortResult.split('\n'); | ||
return lines | ||
.map(l => { | ||
const [status, path] = l.trim().split(' '); | ||
return { status, path }; | ||
}) | ||
.filter(({ status, path }) => status !== ''); | ||
}; | ||
const getCurrentBranch = () => child_process_1.execSync(`git rev-parse --abbrev-ref HEAD`) | ||
@@ -75,3 +67,3 @@ .toString() | ||
} | ||
const st = gitStatus(result.toString()); | ||
const st = git_helper_1.parseGitStatus(result.toString()); | ||
log('[commit] st: ', st); | ||
@@ -86,3 +78,3 @@ const paths = files | ||
log('[commit] path string:', pathString); | ||
return this.runCmd(`git commit ${pathString} -m "${msg}"`, { | ||
return this.runCmds([`git add ${pathString}`, `git commit ${pathString} -m "${msg}"`], { | ||
cwd: this.projectRoot | ||
@@ -89,0 +81,0 @@ }); |
{ | ||
"name": "@pie-framework/build-helper", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
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
267435
41
732