Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Commit 85abf6a

Browse files
authored
Merge pull request #56 from priestine/dev
Dev
2 parents 0aedcf0 + af324c9 commit 85abf6a

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

src/middleware/get-latest-version-tag.middleware.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,8 @@ export function getLatestVersionTag({ intermediate }: SemanticsCtx) {
1717
};
1818
})
1919
.catch((e) => {
20-
if (!/\nfatal: No names found, cannot describe anything/.test(e)) {
21-
Log.error(e.replace('\n', '->'));
22-
process.exit(1);
23-
}
24-
2520
Log.warning(
26-
`There are no previous tags matching the "${Iro.yellow(
21+
`There seem to be no previous tags matching the "${Iro.yellow(
2722
`${intermediate.prefix}*${intermediate.postfix}`
2823
)}" pattern.`
2924
);

src/middleware/publish-tag-if-required.middleware.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ export function publishTagIfRequired({ intermediate }: SemanticsCtx) {
2525
: execSync('git config --get remote.origin.url', { encoding: 'utf8' });
2626

2727
let branch = execSync('git rev-parse --abbrev-ref HEAD', { encoding: 'utf8' });
28-
if (branch == 'HEAD') {
28+
if (/HEAD/.test('HEAD')) {
2929
branch = execSync('git name-rev HEAD', { encoding: 'utf8' }).replace(/HEAD\s+/, '');
30+
Log.warning(`The HEAD is detached. Current branch is ${branch}`);
3031
}
3132

3233
if (!origin.includes('@')) {

0 commit comments

Comments
 (0)