mirror of
https://github.com/PaulHatch/semantic-version.git
synced 2025-12-27 04:58:17 +00:00
Can't default to GITHUB_REF_NAME during testing
This commit is contained in:
parent
f53462a96e
commit
8d3552d384
4 changed files with 4 additions and 10 deletions
4
dist/index.js
vendored
4
dist/index.js
vendored
|
|
@ -984,9 +984,7 @@ class DefaultCurrentCommitResolver {
|
|||
}
|
||||
ResolveBranchNameAsync() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const branchName = this.branch == 'HEAD' ?
|
||||
process.env.GITHUB_REF_NAME || (yield (0, CommandRunner_1.cmd)('git', 'rev-parse', '--abbrev-ref', 'HEAD'))
|
||||
: this.branch;
|
||||
const branchName = this.branch == 'HEAD' ? yield (0, CommandRunner_1.cmd)('git', 'rev-parse', '--abbrev-ref', 'HEAD') : this.branch;
|
||||
return branchName.trim();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -31,9 +31,7 @@ class DefaultCurrentCommitResolver {
|
|||
}
|
||||
ResolveBranchNameAsync() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const branchName = this.branch == 'HEAD' ?
|
||||
process.env.GITHUB_REF_NAME || (yield (0, CommandRunner_1.cmd)('git', 'rev-parse', '--abbrev-ref', 'HEAD'))
|
||||
: this.branch;
|
||||
const branchName = this.branch == 'HEAD' ? yield (0, CommandRunner_1.cmd)('git', 'rev-parse', '--abbrev-ref', 'HEAD') : this.branch;
|
||||
return branchName.trim();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,9 +25,7 @@ export class DefaultCurrentCommitResolver implements CurrentCommitResolver {
|
|||
|
||||
public async ResolveBranchNameAsync(): Promise<string> {
|
||||
const branchName =
|
||||
this.branch == 'HEAD' ?
|
||||
process.env.GITHUB_REF_NAME || await cmd('git', 'rev-parse', '--abbrev-ref', 'HEAD')
|
||||
: this.branch;
|
||||
this.branch == 'HEAD' ? await cmd('git', 'rev-parse', '--abbrev-ref', 'HEAD') : this.branch;
|
||||
|
||||
|
||||
return branchName.trim();
|
||||
|
|
|
|||
Loading…
Reference in a new issue