mirror of
https://github.com/PaulHatch/semantic-version.git
synced 2025-12-28 21:38:18 +00:00
Run commands sliently
This commit is contained in:
parent
866aab0885
commit
4160681a29
1 changed files with 13 additions and 1 deletions
14
index.js
14
index.js
|
|
@ -12,7 +12,8 @@ const cmd = async (command, ...args) => {
|
||||||
options.listeners = {
|
options.listeners = {
|
||||||
stdout: (data) => { output += data.toString(); },
|
stdout: (data) => { output += data.toString(); },
|
||||||
stderr: (data) => { errors += data.toString(); },
|
stderr: (data) => { errors += data.toString(); },
|
||||||
ignoreReturnCode: true
|
ignoreReturnCode: true,
|
||||||
|
silent: true
|
||||||
};
|
};
|
||||||
|
|
||||||
await exec.exec(command, args, options)
|
await exec.exec(command, args, options)
|
||||||
|
|
@ -104,6 +105,17 @@ async function run() {
|
||||||
`--match=${releasePattern}`,
|
`--match=${releasePattern}`,
|
||||||
`${branch}~1`
|
`${branch}~1`
|
||||||
)).trim();
|
)).trim();
|
||||||
|
|
||||||
|
if (tag === '') {
|
||||||
|
tag = (await cmd(
|
||||||
|
'git',
|
||||||
|
`tag`,
|
||||||
|
`--list ${releasePattern}`,
|
||||||
|
`--points-at ${branch}`
|
||||||
|
)).trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
tag = '';
|
tag = '';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue